The true intent can not be divined from what little is given to describe the scenario, but if CL must be used, then what about using OPNQRYF to get the desired key values. Then loop through those selected rows with the RCVF, omitting\ignoring any values\rows that do not match what is desired within the CL? That would be just one full-open, and the Receive File request would share the ODP of the Open Query File.

Regards, Chuck

On 30 May 2012 14:19, Stone, Joel wrote:
Ooooh - that's it!!

Makes sense - I will give this a try.

Jeff.Nyco on Wednesday, May 30, 2012 3:51 PM wrote:

The technique requires the use of CPYF, using the record/field
selection, to copy the 1 record you need into a work-file you have
opened, then use a simple sequential RCVF.
As long as you don't hit EOF (CPF0864 I think) and close the file,
you can read any records, just like a CHAIN.


Stone, Joel on Wednesday, May 30, 2012 1:46 PM wrote:

I have a CL loop as follows:

Load keyValue
monmsg (cpf4137 cpf0864) exec(deal-with-it) /* <ed: addendum> */
goto Top

The OVRDBF positions the file ONLY the first time thru
(apparently it only positions for the NEXT file open).

How can I read the record that I need (using keys) several
times in on CL run?

This thread ...


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

This mailing list archive is Copyright 1997-2019 by 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].