Logic help required RPGLE

405 pts.
Tags:
AS/400
RPGLE
I have a screen now in the screen I have few options eg.. Sel1, Sel2...etc. If I go in Sel1 I get another screen as subfile which provide me to select Sel11, Sel12, Sel13...etc. Not after making selections from Sel11, Sel21....Selnn, I come back to the first screen. Now I have to Save this selection Sel11, Sel12. In to a file so that I could see what all selection I made in my previous login. We can use F10 for saving the last selection criteria in to a file. Please help.
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi Abhisheka1,

You could have work file with User, 1st Screen Selection, 2nd Screen Selections fields (you can include addl fields based on your requirement).
Each time you choose to save new options, this file should be cleared and written with new options selected.
You could follow below algorithm to do this.
1. Select Records in 1st Screen.
2. Process the Selected Records and display second screen with sub Options.
3. Select the Records
4. Once F10 is pressed to save the records.
    a. Clear the work file.
    b. READC to read the changed records and identify selection.
    c. Write the records to work file.
5. On your next login, Read work file for loading the selected records on initial display.
Pradeep.

Discuss This Question:  

 
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.

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.

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

Following

Share this item with your network: