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



Our company standard is an infinite loop:

Setll keyfield File1;
Dow 1 = 1;
   Reade keyfield File1;
   If %Eof(File1);
      Leave;
   Endif;
   // valid record read - do something
Enddo;

This was our way of making loops consistant, and not having to worry about
if the the programmer decided to put the read at the top of the loop, or at
the bottom, or both - since some of the old code has really long and if you
couldn't find the enddo, you could miss something.
Carmen Nuland 

-----Original Message-----
From: Booth Martin [mailto:booth@xxxxxxxxxxxx] 
Sent: Thursday, March 01, 2007 8:10 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: CHAIN Versus SETLL and READ When Data Needed

Is that a good practice?  I can't imagine a design need for an endless loop?

Wes Reinhold wrote:
There was a lot of 'bad mouthing' of iter, leave, etc. yesterday.  How 
would you get out of a DOW 0=0 without using them?





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.