|
Hi Paul! The thinking is that you didn't actually hit end of file. Only a READ can hit the end of file; CHAIN can only either find or not find a record. Yeah, it's a pain in the butt because it blows up the shortcut that many of us have used for 20 years or so. I understand the thinking that %EOF and %FOUND are different. How about a new BIF that does what we want? Like %DATA. If a CHAIN *or* a READ are successful in putting data into the buffer, then %DATA is true. We could then do this: Chain ( SomeKey ) File; DoW %Data( File ); // do something ReadE ( SomeKey ) File; EndDo; Joe > From: Paul Morgan > > 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; > > except Chain doesn't fiddle with %EOF so this won't work.
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.