15 pts.
 Switch between two display files
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.

Software/Hardware used:
ASKED: October 10, 2008  7:04 AM
UPDATED: October 10, 2008  5:47 PM

Answer Wiki:
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
Last Wiki Answer Submitted:  October 10, 2008  5:47 pm  by  Sri400   30 pts.
All Answer Wiki Contributors:  Sri400   30 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _