Switch between two display files

15 pts.
Tags:
RPG
RPGLE
I M USING A RPGLE PRGM IN WHICH THERE ARE 2 SCREENS.1 CONTAINS ALL THE RECORDS OF CUST ,IN WHICH 1 CAN USE OPT 2OR 4 FOR UPDATE AND DELETE.BOTH THE FUNCTIONS ARE WORKING BUT WHEN UPDATE SCREEN OPENS I WANT TO GO BACK TO MAIN SCREEN WHICH CONTAINS ALL THE RECORDS.SO PLZ TELLL ME HOW TO DO IT.

Answer Wiki

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

Hi,

Use the SFLRCDNBR keyword with a field in the display file, Initilize this field with ‘1’ within the program. and move the RRN number into this field upon selection of the option ‘2’ or ‘4’. This would return you back to the same record you selected. This technique is called “Sticking a Sub File”. Guru’s correct me if I am wrong.

Regards
Sri

Excellent “Sticking a Sub File” that’s great, I didn’t know there was a phrase for it.

Sequence
1. Do the update screen stuff
2. if the select field (2/4) is I/O you’ll want to move a space to it and update the subfile record
if the update changes the SFL record value include those changes on this update
3. Set the SFLRCDNBR field to the RRN
4. EXFMT of the SFLCTL to show the screen again.

When a delete occurs you might want to reload the subfile or you could change the SFL record fields to blanks or ** deleted ** and update it.

Phil

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.

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

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