RCVF will continue to work but it will start at the first record and read each one sequentially until the end of the file. I think you might want to key the file so the records arrive in newest to oldest sequence then only the first read would be needed. Any other method of retrieving the record would work as well.

I did not see if you are at V7 or not but the new RUNSQL statement might help with retrieving the correct row from the table. It's a bit easier than OPNQRYF.

Jim Oberholtzer
Chief Technical Architect
Agile Technology Architects


On 3/24/2013 6:59 AM, A Paul wrote:
Thanks Keith, I created a file to store the parameters(first field is program_name, so it lets others to add parameters for their programs as well) , if my PF has more than one record in future, will RCVF fail? or do I use OPNQRYF to point to record?

From: Keith McCully<keithmccully@xxxxxxxxx>
To: Midrange Systems Technical Discussion<midrange-l@xxxxxxxxxxxx>
Sent: Sunday, 24 March 2013, 1:36
Subject: Re: soft coding parameters

If you expect the command parameters not to change too much, then you could
store the parameters as separate fields in a physical file with a single
record. You could also include the library as a field, so RTVOBJD no longer
necessary.

To implement declare the file via DCLF fileName. This will automatically
add the fields as variables at compile time - see the listing.

RCVF will open the file at run time and load the fields into the program
variables from the single record.

If little or no ongoing maintenance is required the just use SQL or DFU to
populate the fields.
--

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-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.