What does the following return?
Select count(*) from arlcu where cunano = ' 000117'
Do you by chance have the field name for the National Account instead of
By the way, you will count the last record twice because you increment the
counters after the read without checking %eof.
Scott Mildenberger | Software Developer | Washington Corporations | 101
International Drive | Missoula, MT 59808 | Office: (406) 523-1536 |
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxx> On Behalf Of Thomas Burrows
Sent: Tuesday, October 23, 2018 11:54 AM
Subject: Re: Problem with reading a file that does have keys
Here is what I mean from top to bottom on the file.
Using DBU here are the first three variables or columns.
Key 1 is the first column A5 length. Key 2 is the second column A14 length
company Customer National
005 000059 000059
005 000117 000117
005 000125 000117
005 000133 000117
005 000141 000117
005 000158 000117
005 000166 021436
005 000174 074625
005 000182 000182
005 000208 000208
005 000224 000224
setll (cuco: cucuno) arlcu;
dow not %eof(arlcu);
if cunano = ' 000117';
count4 = count4 + 1;
cunano = cunano;
count1 = count1 + 1;
I get 14 for count4. And 36 thousand plus for counter1. Which is the
number of records in ARLCU. Which in real life is a LF, but when I copied
the file into my library ARLCU became a PF.
What am I missing here?
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
Please contact support@xxxxxxxxxxxx for any subscription related
Help support midrange.com by shopping at amazon.com with our affiliate