Using the .RTN command

You can branch to as many screen spaces as you want in ASF and TSF by using the .FGO or .SGO command to chain screen spaces together.

The .RTN immediate command is required at the end of the last screen space in an ASF or TSF sequence in order to end the sequence, return to the original calling panel or branch to the next, and re-enable exception analysis for further automatic calls. You can use the definition mode (the /DEF ON command) when creating screen spaces that contain the .RTN command.

Normally, you use the .RTN command without a screen space name to return to the calling panel. The .RTN command also accepts an argument which forces the return to a screen space that is not the calling panel. For example, to return to a panel called SCREEN2, enter the .RTN command followed by SCREEN2.

You can delay the return for up to 35 cycles by placing the number of cycles to be delayed in the label field of .RTN (1 to 9 for numbers 1–9 and A–Z for numbers 10–35). The following command causes a return to SCREEN2 after 6 cycles:
6.RTN SCREEN2

On each cycle, OMEGAMON for CICS (3270) replaces the number in the label field with the next lower number. When the count reaches zero, it fetches SCREEN2.