|
On Sun, 2004-11-28 at 20:42, Michael wrote: > Question: > ========= > The RPG program resume from EOFW when I insert a new record into the > physical file which status='OS'. But the problem is that, the > program does not resume when I change the status of an existing > record from other values to 'OS'. > > In the view of the logical file, there is a new record if a message's > status is changed from other values to 'OS' in the physical file. > > Any mistake in my method? Any method to fix it? Thank you! EOFW means "End of File Wait". Simply put, adding a record to the file causes the program to wake up and respond to the new record. It doesn't catch updates. It's a very old method from at least the System/38 days. If you want to catch updates, you have a couple of options: 1) Change the program so that it does a SETLL on the logical, reads all the records, then sleeps via DLYJOB for a predetermined amount of time (say, a minute). Then repeat. The downside is that it can take up to a minute to respond to a new or changed record which may or may not be acceptable in your application. 2) Use a database trigger. Add a trigger to your transaction file, and then write a trigger processor to take care of any changes. It's a bit more convoluted, but it will be more responsive than option 1. You could also use journals, or data areas as message passing mechanisms, but I would probably go with option two. -- Regards, Rich Current Conditions in Des Moines, IA Overcast Temp 33.8F, Windchill 27F Winds out of the West at 8mph
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.