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
- Requires *USE authority for the menu and its display and message file or program, whichever applies.
- Also requires *USE authority for the library where the menu is located.
Parameters
MENU
Menu
Specifies the menu to be shown. This is a required parameter. It is a qualified name: qualifier 1 is the menu and qualifier 2 is the library.
*ALL- Qualifier 1: all menus in the specified library are listed for selection. Qualifier 2: all libraries in the system, including QSYS, are searched.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Menu
Menu
Suggested / special values:
*ALL
Library
Library
Suggested / special values:
*LIBL, *CURLIB, *USRLIBL, *ALL, *ALLUSR
RTNPNT
Return point
Specifies whether to return to the display where the command is entered when the Exit key is pressed.
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).
Generated from os/cl/catalog/GO.json and os/cl/help/GO.json.