|
Hi, when you use EOFW processing (by overriding the file with an EOFDLY value), the read operation stops, when EOF is reached and waits for the specified interval time, until it continues with the next statement after the read. When the read is waiting, the internal file pointer has reached EOF. This will not be affected, if a data change occurs in previous records. The file pointer remains at EOF. I never tried to use %eof in this case and I doubt about it's effect. What we have done in such cases is, we delete the changed record in the LF and write it (changed) again into the file. Then the read occurs for the "new" record. Regards, Werner Noll -----Ursprüngliche Nachricht----- Von: Michael [mailto:mckhmail-web@xxxxxxxxxxxx] Gesendet: Montag, 29. November 2004 03:43 An: rpg400-l@xxxxxxxxxxxx Betreff: EOFW not resume Background: =========== *** Physical file contains record with different status (e.g. OS, ER, SD...). *** Logical file selects only records which status='OS' from the physical file. *** RPG program monitors logical file for records status='OS' continuously. I am using EOFW for this purpose. Code: ===== C* Read the logical file GWRQCTL1 C READ GWRQCTL1 C DOW NOT %EOF(GWRQCTL1) C* C* Handle special record used to terminate the program C IF GCWFRF = *ALL'Z' C DELETE GWRQCTL1 C FEOD GWRQCTL1 C* C* Handle record which status='OS' C ELSE C* do something ... C ENDIF C* C READ GWRQCTL1 C ENDDO 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! -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.