thanks

On Tue, Oct 23, 2018 at 10:54 AM <SCOURTNEY@xxxxxxxxxxx> wrote:

Hello,

did u do a SETLL outside the do loop..

Also change the loop to DOW NOT %EOF(Filename)
Read Filename
If not %eof(filename)
Exsr doWork
Endif
ENDDO

-----Ursprüngliche Nachricht-----
Von: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im Auftrag von Thomas
Burrows
Gesendet: Dienstag, 23. Oktober 2018 17:46
An: rpg400-l@xxxxxxxxxxxx
Betreff: Problem with reading a file that does have keys

I want to read a keyed file from top to bottom. i.e. I am finding that I
seem to read some records more than once.

is there anything on the F specs I could be overlooking?
I put a counter in for the read and I get the right number of times through
the read routine.

Doing a "DOU NOT %EOF(filename)
Then an EXSR X1 to the read routine where the read on the file is
BEGSR x1
READ FILENAME;
endsr

I put an if statement in after the read looking against one of the account
numbers that is only in the file being read from once. But I get SEVEN or
more hits in the IF statement checking against that one account number.

Thomas Burrows
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link:
http://amzn.to/2dEadiD

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2020 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].