Where & how did you populate A_Row?

On 2/6/2026 1:11 PM, Mohan Eashver wrote:
Happy Friday All,

I have a file with multiple rows for a KEY field.
My task is to save the first & last rows for the Key-Combo & compare them
later.

My RPG program does SETLL & READE to get the 1st row & SETGT & READPE to
get the last row.

In this RPG-Free code, I3APPTP1 is the File name & fI3APPTP1 is the Record
Format name.

After the program runs, there is nothing in A_Row, nothing in I3A_First &
nothing in I3A_Last.

But through my debug session I can confirm that READE & READPE are
successfully completing the IO & I have seen the values when I lookup (eval
field1 etc) every column of the row.

dcl-F I3APPTP1 Usage(*Input : *Update) Keyed USROPN;

dcl-DS I3A_First ExtName('I3APPTP1') Qualified;
end-DS;

dcl-DS I3A_Last ExtName('I3APPTP1') Qualified;
end-DS;

dcl-DS A_Row LikeRec(fI3APPTP1 : *ALL);

setLL (...) fI3APPTP1;
readE (...) fI3APPTP1;
I3A_First = A_Row;

setGT (...) fI3APPTP1;
readPE (...) fI3APPTP1;
I3A_Last = A_Row;

I am looking for a solution entirely using Free RPG hence not looking for a
SQL solution at this time.

----
Regards,
Mohan Eashver



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

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