RPGLE Subfile Validation

5 pts.
Tags:
AS/400
IBM iSeries
RPGLE
RPGLE - subfile
Hi Everybody,
I am new to RPGLE and I hope you can help me with my problem.
I have used a subfile for loading details in my program.
Now it is expanded subfile (page down on the next page) cause there is a lot of transactions displayed. My problem is that I have entered a selection on the first page (1 to view the transaction) then went on the second page and added another selection for another transaction (2 - to maintain). I pressed the enter key on the second screen and it only executed option 2 and not option 1 (from first screen). How do I validate all the selections entered from screen 1 even when I pressed or triggered the validate or execute key on screen 2? In much simpler form, Is there a way to read all subfile displayed starting with the very first record on screen 1 even when you are on screen 2 or 3?
Thank you so much for the help.
Regards,
Calvin


Software/Hardware used:
AS400 Iseries RPGLE

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta

    Is there a way to read all subfile displayed startng with the very first record on screen 1 even when you are on screen 2 or 3?

    Yes, you read the records that have selections entered. In general, it doesn't matter what 'page' you press the [Enter] key on.

    Actually, I'm not quite clear on how you read the second option record without reading the first. That should take some very determined coding. It's not the kind of thing that happens by accident.

    Either we need to see your subfile DDS and your subfile processing logic or you need to run in debug to see where your logic is getting off track. We have no way to guess what's going wrong without seeing code. (There are effectively infinite possible code paths after all.)

    Tom

    125,585 pointsBadges:
    report
  • philpl1jb

    Yes, you can loop through all the subfile records.

    For Pos = 1 to TotSFLRec; // pos is structured like rrn

       Chain Pos mySFLREC;  // mySFLREC is the subfile record name

         if Sel <> ' ';  // Sel is the selection field name on the subfile

            Exsr processReq;

       endif;

    endfor;

    Tom

    On page down his code loaded the next page and did an exfmt, the 1 entered on the first page wasn't processed and is no longer going to be found with readc ..

    Phil

       Exsr

     

    50,860 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following