z/OS ISPF User's Guide Vol I
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using the RETURN command

z/OS ISPF User's Guide Vol I
SC19-3627-00

The RETURN command causes the immediate return to a primary option menu or to the display from which you entered a nested dialog. When a RETURN command is entered, the DM component takes this action:

  1. It simulates the END command on the panel that is currently displayed; that is, the DISPLAY or TBDISPL service returns a code of 8.
  2. For subsequent requests, made through the DISPLAY or TBDISPL service, for display of a different panel, the panel is not displayed, and a return code of 8 is issued by the service.
  3. However, when two consecutive display requests name the same panel, normal operation of the DISPLAY and TBDISPL services is restored and processing proceeds as though RETURN had not been entered. The DM component decides whether to proceed. Generally, because RETURN signals the application user's desire to end the current processing, a developer can limit processing after the RETURN is received to clean up and do final processing before returning control to the dialog element from which the function was started.
  4. If two consecutive requests do not specify the same panel, processing continues in the mode described in item 2 until control is returned to a primary option menu or a nested dialog completes. Then, normal operation of the DISPLAY and TBDISPL services is restored.

It might be necessary to suspend processing of a panel temporarily so that other panels can be displayed. Issue a CONTROL DISPLAY SAVE request to save the contents and control information of the panel whose processing is to be suspended. Before resuming the processing of this panel, issue CONTROL DISPLAY RESTORE to reinstate the contents and control information for the panel. If non-ISPF screens have been displayed, issue CONTROL DISPLAY REFRESH to clear the screen.

This mode of operation continues until either a primary option menu is encountered or a nested dialog completes. If a primary option menu is encountered, it is displayed. If a nested dialog completes, the panel from which it was invoked is redisplayed. This panel is exactly as you last saw it, except that the command field is blank. In either case, this completes the action of the RETURN command.
Note: A nested dialog is one invoked from any panel by a SELECT action command. The HELP and KEYS commands invoke nested dialogs. In addition, the TSO system commands invoke nested dialogs when they are used to execute a CLIST procedure that displays panels through ISPF services.
If a dialog function needs to distinguish between END and RETURN, it can do so in one of these ways:
  • If the panel was defined using the panel definition statements, upon return from the DISPLAY or TBDISPL service, with a return code of 8, the function can examine variable ZVERB in the shared pool. It contains either END or RETURN.
  • If the panel was defined using the DTL, upon return from the DISPLAY or TBDISPL service, with a return code of 8, the function can examine variable ZVERB in the shared pool. It contains either EXIT or CANCEL.
  • Upon return from the SELECT service when the PANEL keyword was specified, the dialog function can examine the return code from SELECT. Return code 0 indicates that the END command was entered on the selected menu panel. Return code 4 indicates that the RETURN command was entered on the selected menu panel or on some lower-level menu.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014