Display Menu Option (DSPMNUOPT)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Display Menu Option (DSPMNUOPT) command retrieves the command string behind a standard IBM i DDS/MSGF-based menu option. The command does not work with UIM or 3rd-part menus. The option is display in the following format:

 > dspmnuopt menu(mymenu) option(3)
    3. call AP0238

A single option or all menu options may be displayed. The displayed option is or the display options are written to the joblog as *INFO messages. Therefore the options should appear on the Command Entry display or in the subfile program message queue of whatever application ran the DSPMNUOPT command.

Top

Parameters

Keyword Description Choices Notes
MENU Menu Qualified object name Required, Positional 1
Qualifier 1: Menu Name
Qualifier 2: Library Name, *CURLIB, *LIBL
OPTION Menu option 1-99, *ALL Optional, Positional 2
Top

Menu (MENU)

Specifies menu name whose option string is displayed.

This is a required parameter.

Qualifier 1: Menu

name
Specify the name of of the menu whose option(s) are displayed.

Qualifier 2: Library

*CURLIB
The menu exists in the current library or if no *CURLIB is set, in QGPL.
*LIBL
The library list is searched for the menu.
name
Specify the name of the library where the menu exists.
Top

Menu option (OPTION)

Specifies the menu option to display or *ALL to display all menu options.

*ALL
This default value lists the command string behind all the menu options.
1-99
Specify the individual menu option whose command string is displayed.
Top

Examples for DSPMNUOPT

Example 1: Simple Command Example

DSPMNUOPT  MENU(MYMENU) OPTION(3)

This command retrieves the command string behind menu option 3 of the MYMENU menu (found on the library lsit) and writes that command string to the joblog.

Example 2: More Complex Command Example

DSPMNUOPT  MENU(MYMENU) OPTION(*ALL)

This command retrieves each menu option behind the MYMENU menu and lists them in order.

Top

Error messages

Unknown
Top