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.
Excellent “Sticking a Sub File” that’s great, I didn’t know there was a phrase for it.
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.