|
Why doesn't a failed CHAIN (which sets off %FOUND) also set on %EOF?
Rather that doing a SetLL/ReadE combo to start the loop it used to be shorthand to code a Chain with:
Chain ( SomeKey ) File; DoW Not %Eof( File ); // do something ReadE ( SomeKey ) File; EndDo;
chain (SomeKey) File; *IN67 = not %found;
dow not *in67; // do something ReadE ( SomeKey ) File; *IN67 = %eof; EndDo;
Even better, using the BIFs you can also use a named indicator!
D success s 1N
. . .
chain (SomeKey) File; success = %found;
dow success; // do something ReadE ( SomeKey ) File; success = not %eof; EndDo;
Always better to use meaningful names!
Any possibility of getting Chain to set the %EOF indicator as well as the %FOUND indicator? Or would that break existing code?
setll (SomeKey) File;
dow (%READE (SomeKey) File); // do something EndDo;
As an Amazon Associate we earn from qualifying purchases.
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.