× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re[2]: what is unclear - LEAVE
  • From: ericadelong@xxxxxxxx
  • Date: Fri, 08 May 98 09:18:53 -0500


     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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.