Hi Jason,

Because according to the manual,

"The following operations, if successful, set %EOF(filename) off. If the operation is not successful,
%EOF(filename) is not changed. %EOF with no parameter is not changed by these operations.
• “CHAIN (Random Retrieval from a File)” on page 716
• “OPEN (Open File for Processing)” on page 828
• “SETGT (Set Greater Than)” on page 856
• “SETLL (Set Lower Limit)” on page 859"

If the SETLL fails, for whatever reason, then %EOF does not reliably tell you anything.

On 3/17/2023 10:13 PM, Jason Maple wrote:
I haven’t seen anyone say this, but why would you not simply use %EOF?
IF Not %EOF(MyFile);
READ MyFile;
do something different;

You can stick it in a do loop if you want to read more than just one record.

Get Outlook for iOS<https://aka.ms/o0ukef>
From: RPG400-L<rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Patrik Schindler<poc@xxxxxxxxxx>
Sent: Friday, March 17, 2023 6:36:16 PM
To: RPG programming on IBM i<rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: SETLL *START and %EQUAL

Hello Alan,

Am 17.03.2023 um 21:06 schrieb Alan Cassidy<cfuture@xxxxxxxxxxx>:

Your answer was good, I was just adding to yours and Jon's. I don't know why you thought mine was a reply to yours.
Because you quoted my text. :-)

:wq! PoC

This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email:RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email:RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives

Please contactsupport@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

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