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



Barbara,

Does the %STATUS value get set even if the "E" operation extender is NOT
used?
If so, does this mean we can check for error conditions without
specifying the "E" extender, but simply testing the %STATUS value
instead of the Boolean-like %ERROR?

Bob

> -----Original Message-----
> From: rpg400-l-admin@midrange.com
> [mailto:rpg400-l-admin@midrange.com] On Behalf Of Barbara Morris
> Sent: Thursday, June 06, 2002 7:33 PM
> To: rpg400-l@midrange.com
> Subject: Re: Resetting %EOF
>
>
> Juan Robledo wrote:
> >
> > Hello all,
> > How can i reset  %EOF??   I am on V4R4. I am using a DoW
> loop.   I am doing
> > a setll but it does seem to reset the %EOF.
> > any ideas?
>
> Juan, in V5R1, a change was made so that a successful SETLL sets
> %EOF(file) to off.  (It doesn't affect %EOF with no
> parameter).  Same for SETGT and CHAIN.
>
> Others have already made good suggestions for other ways to
> code this, but to get around the problem in V4R4, you can
> code this way, since the file status will be something like
> 00010 and 00011 for not-found and eof.
>
> c      setll  file
> c      dow    %status(file) = 0
> c      reade  file
> c      whatever
> c      enddo
>
> Same thing works for a CHAIN/READE loop:
>
> c      chain  file
> c      dow    %status(file) = 0
> c      whatever
> c      reade  file
> c      enddo
>
> Barbara
>
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L)
> mailing list To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.