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



You are not "priming" your loop.

The way I would code this same thing would be:

 C     KlistB        SetLL     IN057P2
 C     KlistB        ReadE     IN057P2
 C                   DOW       Not %EOF(IN057P2)
     --- Process record here ---
 C     KlistB        ReadE     IN057P2
 C                   EndDo

So you need 2 read statements.  One *before* you enter your DOW loop to
"prime" the
indicator, the second just before the enddo to read the next record.

You also don't need the If %EOF... leave statement.  Adding an extra read,
and moving a read is a good trade off for getting rid of a leave statement,
IMO.

You can also change your DOW to a DOU, but then you would need your leave
statement.

Regards,

Jim Langston

-----Original Message-----
From: Juan Robledo [mailto:Juan_Robledo@irco.com]

here is  a some of the code


 C     KlistB        SetLL     IN057P2

 C                        DOW       Not %EOF(IN057P2)
 C     KlistB        ReadE     IN057P2
 C                        If        %EOF(IN057P2)
 C                              Leave
 C                       EndIf


Juan Robledo
Programmer Analyst


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.