|
Paul,
I agree. Of course I've used priming reads, but to me, it is less
intuitive or even logically inconsistent. To me, the preferred
structure is:
C* load page to subfile - PAGE DN
C clear SLFcnt
C KL setll filex
C*
C DOU (SFLcnt >= 10)
C reade filex 90
C 90 leave
C*
C add 1 SFLcnt
C write subfile
C*
C ENDDO
C* Display SFL (*in90 turns off '*more')
C IF (SFLcnt <> 0)
C write SFLctlrcd
C ENDIF
The benefits are: 1) Looping logic does not need to detect EOF
conditions. Looping conditions are easier to decipher. 2) Only one
database read is needed.
Of course, never say never.... I code what's necessary, not what I
prefer sometimes. However, I look at most "textbook" examples of RPG
code with a skeptical eye because most RPG textbooks seem to be out of
date by more than a little.
Eric A DeLong
ericadelong@pmsc.com
______________________________ Reply Separator _________________________________
Subject: Re: what is unclear - LEAVE
Author: <MIDRANGE-L@midrange.com > at INTERNET
Date: 5/7/98 9:51 PM
>(BTW, my preference is a DOW with a priming read, and a read at the bottom
>of the loop)
>
>Regards,
>
>Rick
It's always struck me as sloppy coding to require 2 reads for the same
file... (: I'm not really sure of what logic I like to eliminate this
'priming read,' but I know I don't like that extra read.
--Paul E Musselman
PaulMMn@ix.netcom.com
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
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.