Personally I think FEOD(N) is a better option here.

Not sure if shared ODP will work - I guess it should do - but shared ODP = shared cursor and that can cause issues for an unwary maintenance programmer down the road.


Jon Paris
Jon.Paris@xxxxxxxxxxxxxx



On May 9, 2025, at 5:36 PM, Infodorado InfoDorado via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx> wrote:

Hey folks,
What about doing an OVRDBF to share the open data path before opening the file in CL, so an update in the RPG will be regarded as an update in the CL and when it returns to the CL it will grab the next record.

Is that right?

--Alan


On 05/09/2025 11:53 AM EDT Dan Bale <dan.bale@xxxxxxxxxxxxxxxxxxxxx> wrote:


The RPG program must either set LR on before returning to the CL program or you need a FEOD operation on the LF.

- Dan Bale

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of John Smith
Sent: Friday, May 9, 2025 11:20 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Rcvf in cl

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?

*** CONFIDENTIALITY NOTICE: The information contained in this communication may be confidential, and is intended only for the use of the recipients named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender. ***
--
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.
--
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 ...

Follow-Ups:
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.