Command reference / sys

CRTMNU

Create Menu

Creates a menu. A display file menu (TYPE(*DSPF)) uses an existing display file for its image and a message file whose messages USRnnnn hold the command of option nn. A program menu (TYPE(*PGM)) calls a program each time the menu is requested. A UIM menu (TYPE(*UIM)) is compiled from UIM tag language source (a panel group with a menu panel).

Allowed environments: *ALL. Positional parameters: 2.

Restrictions

Parameters

TYPE Menu type

The type of menu. This parameter is required.

Type
*CHAR
Required
Yes
Length
5
Case
Uppercase

Allowed values: *DSPF, *PGM, *UIM

*DSPF
The menu shows a display file and runs the commands of a message file.
*PGM
The menu calls a program when it is requested.
*UIM
The menu is created from UIM tag language in the source file and member given by SRCFILE and SRCMBR.

DSPF Display file

The display file of a TYPE(*DSPF) menu. It must contain a record format with the name of the display file (the menu format), use a separate indicator area (INDARA) and contain no subfiles. Help formats are named #Hxxyy, covering options xx through yy; #H0000 is the general help of the menu.

Type
*QUAL
Required
No
Case
Uppercase
*MENU
The display file has the name of the menu.
*LIBL
Searches every library in the thread's library list until the first match is found.
*CURLIB
The job's current library. If no current library is in the library list, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Display file Display file

Type
*NAME
Required
No
Default
*MENU
Length
10
Case
Uppercase

Suggested / special values: *MENU

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

MSGF Message file

The message file holding the commands of a TYPE(*DSPF) menu. The message identifier of an option is USRxxxx, where xxxx is the option number typed; add the messages with ADDMSGD.

Type
*QUAL
Required
No
Case
Uppercase
*MENU
The message file has the name of the menu.
*LIBL
Searches every library in the thread's library list until the first match is found.
*CURLIB
The job's current library. If no current library is in the library list, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Message file Message file

Type
*NAME
Required
No
Default
*MENU
Length
10
Case
Uppercase

Suggested / special values: *MENU

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

CMDLIN Command line

The command line of a TYPE(*DSPF) menu.

Type
*CHAR
Required
No
Default
*LONG
Length
6
Case
Uppercase

Allowed values: *LONG, *SHORT, *NONE

*LONG
A long command line of 153 bytes.
*SHORT
A short command line of 73 bytes.
*NONE
No command line; a 4-byte option line is shown instead.

DSPKEY Display function keys

Whether a TYPE(*DSPF) menu describes its active function keys at the bottom of the display.

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

Allowed values: *NO, *YES

*NO
The function keys are not described.
*YES
The function keys are described.

PGM Program

The program a TYPE(*PGM) menu calls. It receives the 10-character menu name, the 10-character menu library and a 2-byte binary return code that it sets: 0 calls the program again, -1 requests Exit, -2 the previous menu and -4 the home menu.

Type
*QUAL
Required
No
Case
Uppercase
*MENU
The program has the name of the menu.
*LIBL
Searches every library in the thread's library list until the first match is found.
*CURLIB
The job's current library. If no current library is in the library list, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Program Program

Type
*NAME
Required
No
Default
*MENU
Length
10
Case
Uppercase

Suggested / special values: *MENU

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

SRCFILE Source file

The source file holding the UIM source of a TYPE(*UIM) menu.

Type
*QUAL
Required
No
Case
Uppercase
QMNUSRC
The source file QMNUSRC.
*LIBL
Searches every library in the thread's library list until the first match is found.
*CURLIB
The job's current library. If no current library is in the library list, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Source file Source file

Type
*NAME
Required
No
Default
QMNUSRC
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

SRCMBR Source member

The source member holding the UIM source of a TYPE(*UIM) menu.

Type
*NAME
Required
No
Default
*MENU
Length
10
Case
Uppercase

Suggested / special values: *MENU

*MENU
The member has the name of the menu.

OPTION Source listing options

The listing options of a TYPE(*UIM) menu.

Type
*CHAR
Required
No
Length
10
List limit
3
Case
Uppercase

Allowed values: *SOURCE, *SRC, *NOSOURCE, *NOSRC, *NOSECLVL, *SECLVL, *NOEVENTF, *EVENTF

*SOURCE
A source listing is produced.
*SRC
A source listing is produced.
*NOSOURCE
No source listing is produced unless errors are found.
*NOSRC
No source listing is produced unless errors are found.
*SECLVL
Second-level message text is printed with the first-level text.
*NOSECLVL
Only first-level message text is printed.
*EVENTF
An event file is produced for CoOperative Development Environment/400 (CODE). Normally set by CODE.
*NOEVENTF
No event file is produced.

INCFILE Include file

The source file of members included by a TYPE(*UIM) menu.

Type
*QUAL
Required
No
Default
*SRCFILE
Case
Uppercase

Suggested / special values: *SRCFILE

*SRCFILE
The file named on SRCFILE.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Include file Include file

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

CURLIB Current library

The current library of the job while the menu is shown.

Type
*NAME
Required
No
Default
*NOCHG
Length
10
Case
Uppercase

Suggested / special values: *NOCHG, *MNULIB, *CRTDFT

*NOCHG
The current library does not change while the menu is shown.
*MNULIB
The library that contains the menu is the current library while the menu is shown.
*CRTDFT
There is no current library while the menu is shown; the previous current library, if any, is restored when the menu is left.

PRDLIB Product library

The product library of the job while the menu is shown. It stays in the library list while the menu is active and is restored when the menu ends.

Type
*NAME
Required
No
Default
*NOCHG
Length
10
Case
Uppercase

Suggested / special values: *NOCHG, *NONE

*NOCHG
The product library is not changed when the menu is shown, and not restored when it is left.
*NONE
The product library entry of the library list is not used while the menu is shown.

CHRID Character identifier

The character identifier of a TYPE(*UIM) menu.

Type
*CHAR
Required
No
Default
*DEVD
Length
10
Case
Uppercase

Suggested / special values: *DEVD, *JOBCCSID, *CHRIDCTL

*DEVD
No conversion is done.

REPLACE Replace menu

Whether an existing menu of the same name is replaced.

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

Allowed values: *YES, *NO

*YES
The existing menu is replaced.
*NO
The existing menu is not replaced and the menu is not created.

TEXT Text 'description'

The text that describes the menu.

Type
*CHAR
Required
No
Default
*SRCMBRTXT
Length
50
Case
Mixed case

Suggested / special values: *SRCMBRTXT, *BLANK

*SRCMBRTXT
The text of the source member, for TYPE(*UIM) menus; other menus get a blank text.
*BLANK
No text.

AUT Authority

The authority given to users who have no specific authority to the menu.

Type
*NAME
Required
No
Default
*LIBCRTAUT
Length
10
Case
Uppercase

Suggested / special values: *LIBCRTAUT, *CHANGE, *ALL, *USE, *EXCLUDE

*LIBCRTAUT
The create authority (CRTAUT) of the library.
*CHANGE
Change authority.
*ALL
All authority.
*USE
Use authority.
*EXCLUDE
No authority.

Examples

CRTMNU MENU(ARLIB/ARPERS) TYPE(*PGM)

Creates menu ARPERS in library ARLIB; when it is requested, it calls program ARPERS.

IBM command documentation

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