Command reference / sys

GO

Go to Menu

Shows the requested menu, given as a specific name or a generic name, and optionally sets whether Exit returns to the display where GO was entered. A menu is pushed onto an internal stack holding ten menus; Cancel shows the previous menu, and when an eleventh menu is pushed the oldest is dropped and cannot be returned to with Cancel. Exit returns the user to the last display or menu from which GO was entered with RTNPNT(*YES), which can also return a calling program to its caller. Exit or Cancel while viewing a menu's help returns to the menu.

Allowed environments: *INTERACT, *IPGM, *IREXX, *EXEC. Positional parameters: 2.

Restrictions

Parameters

RTNPNT Return point

Specifies whether to return to the display where the command is entered when the Exit key is pressed.

Type
*CHAR
Required
No
Default
*YES
Length
4
Case
Uppercase

Allowed values: *YES, *NO

*YES
The display where the command was entered is returned to when Exit is pressed.
*NO
The display where the command was entered is not returned to when Exit is pressed.

Examples

GO MENU(PERSMENU)

Runs the menu PERSMENU, found by searching the library list (*LIBL default). If Exit is pressed while PERSMENU is shown, the display where GO was entered is shown (RTNPNT *YES default).

IBM command documentation

Generated from os/cl/catalog/GO.json and os/cl/help/GO.json.