Sounds like RPG is buffering the writes...

Add a FEOD(n); call before returning from RPG.

For more info, check the RPG list.

Charles


On Fri, May 9, 2025 at 9:20 AM John Smith <smith5646midrange@xxxxxxxxx>
wrote:

I have a coworker that is reading an LF in a CL as a driver. The LF has a
select of "processed <> 'Y'". Her CL calls an RPG program. There are
multiple records with the same key so the RPG program processes all of them
and marks them all processed ='Y'. When the RPG exits, it loops back up to
the rcvf to get the next processed <> 'Y' record. However, when it does
the rcvf, it is picking up records that were just updated by the RPG so
processed = 'Y'.

I have reviewed the code and found nothing unusual that would explain
this. No opnqryf, cpyf, etc. It is just a read loop with the call to the
RPG and a few miscellaneous file locking commands in between.

Does CL take a snapshot of the file before it starts reading or why would
it read records that should be excluded from the LF?
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.