|
That's why I tend to wrap the READ/READE opcode in a procedure...
/free
setll (fld1:fld2) MyFile;
dow ReadMyFile(myFileFieldDS);
//do stuff
enddo;
/end-free
Charles
On Tue, Sep 2, 2008 at 2:09 PM, Lim Hock-Chai
<Lim.Hock-Chai@xxxxxxxxxxxxxxx> wrote:
You sort of already have that.
FMYFILE IF E K DISK INFDS(infdsMyFile)
D infdsMyFile DS qualified
D status *STATUS
D FOUND C const(0)
/free
setll (myKey) myFile;
reade (myKey) myFile;
dow infdsMyFile.status = FOUND;
do stuff...
reade (myKey) myFile;
enddo
/end-free
The reason I ask for bif is because opcode cannot return a value. So,
if bif were existed, the above code would look like below:
FMYFILE IF E K DISK
D FOUND C const(0)
/free
%setll(myKey :myFile);
dow %reade(myKey :myFile) = FOUND; //no double reade needed
do stuff...
Enddo
/end-free
As an Amazon Associate we earn from qualifying purchases.
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.