|
You pays your money - you takes your choice!
I prefer priming a DOW loop with a READ of whatever sort - I don't really
like doing a LEAVE in the middle for EOF condition - seems too much like a
GOTO abuse.
But this is personal taste for the most part - I agree with using the file
name in the %eof() - keeps things clear. And ensures testing the right
condition.
Here's a "priming" version of the 2nd one below - only 1 %eof test - even
though this shows 2 reads - and I might add a %equal test - as someone else
suggested - it's like what I do in embedded SQL - after an OPEN I check
SQLCOD = 0, then do my first FETCH if successful. Then a DOW of SQLCOD
there. I digress!!
firstkey setll file
firstkey reade file
do while not %eof(file)
if not SkipCondition
...do stuff...
endif
firstkey reade file
enddo
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.