× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Although there was no followup to better describe the actual scenario, I will offer the following scenario as an example of something like what I alluded to in the quoted message:

The desired effect is to retrieve the rows with the following key values [shown delimited by quotation marks] from the System Database Cross Reference file QADBXREF, using the Access Path defined by the Logical File QADBXFIL on the two fields (DBXFIL, DBXLIB) which are each 10-byte character:

"QCLSRC QGPL "
"QCLSRC PLIB07 "
"QCLSRC C1 "

dclf mydbxfil /* like QADBXFIL; min.: omit unsupported flds */
opnqryf qadbxfil *inp opnid(xfil) format(mydbxfil)
qryslt(' dbxfil *eq "QCLSRC"
*and dbxlib *eq %values("QGPL" "PLIB07" "C1")
')
ovrdbf mydbxfil qadbxfil share(*yes) ovrscope(*calllvl)
loop:
rcvf opnid(*none)
monmsg cpf0864 exec(do)
...
enddo
...
goto loop
...
clof xfil

Regards, Chuck

On 30 May 2012 14:57, CRPence wrote:
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.

<<SNIP>>

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

I have a CL loop as follows:

Top:
Load keyValue
OVRDBF FILE(TestFile) POSITION(*KEYAE 1 *N &KeyValue)
rcvf
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?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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

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