Create Menu from Msg Files (CRTMSGFMNU)

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

The Create Message File Menu (CRTMSGFMNU) command creates a menu (display file) from the specified message files. You can specify that this menu is created either in a fixed-format, with options 1 through 24 arranged in two columns, or in free-format.

If you want to create a menu from the source member, use the Create System/36 Menu (CRTS36MNU) command.

Restriction: Option 5 of the operating system must be installed to run this command. This command can be run either natively or in the System/36 environment.

Top

Parameters

Keyword Description Choices Notes
CMDTXTMSGF Menu## command message file Qualified object name Optional, Positional 1
Qualifier 1: Menu## command message file Name
Qualifier 2: Library Name, *CURLIB
OPTTXTMSGF Option text message file Single values: *NONE
Other values: Qualified object name
Optional, Positional 2
Qualifier 1: Option text message file Name
Qualifier 2: Library Name, *CMDLIB, *CURLIB
REPLACE Replace menu *NO, *YES Optional
FREEFORM Free form menu *NO, *YES Optional
DDSLIST DDS listing *PARTIAL, *FULL Optional
MAXDEV Maximum devices 1-256, 5 Optional
AUT Authority Name, *USE, *ALL, *CHANGE, *EXCLUDE, *LIBCRTAUT Optional
TOFILE To DDS source file Qualified object name Optional
Qualifier 1: To DDS source file Name, QDDSSRC
Qualifier 2: Library Name, *CMDLIB, *CURLIB
TOMBR To DDS source member Name, *NONE Optional
IGCDTA User specified DBCS data *NO, *YES Optional
TGTRLS Target Release Character value, *CURRENT, *PRV Optional
Top

Menu## command message file (CMDTXTMSGF)

Specifies the name and library of the command text message file that contains the text for the command that runs when the corresponding option is selected. This parameter must identify an existing message file and not a screen file generator (SFGR) or a System/36 message source member. The message IDs used must begin with USR. Trailing ## symbols are required on the CMDTXTMSGF name. The menu (display file) name is the message-file-name without the ## symbols. The run-time menu processor appends the trailing ## symbols to the menu name to determine the message file name. This is the name of the message file that contains messages whose text is the command that is run for any option selected.

This is a required parameter.

message-file-name-##
Specify the message file name used to create the menu. The trailing ## symbols are required. The menu (display file) name is the same as the message file name without the ## symbols.

The possible library values are:

*CURLIB
The current library for the job is used to locate the file. If no library is specified as the current library for the job, the QGPL library is used.
library-name
Specify the name of the library where the command text message file is located. The CMDTXTMSGF library is also where the menu display file is created. This is a requirement of the run-time MENU processor.
Top

Option text message file (OPTTXTMSGF)

Specifies the name and library of the option text message file that contains the text that is displayed on the menu to describe the options that can be selected. The message IDs used must begin with USR, unless *YES is specified on the User specified DBCS data (IGCDTA) parameter, which allows the message ID to begin with USZ.

*NONE
No option text message file is used. The Menu## command message file (CMDTXTMSGF) parameter is used to specify the option text.
message-file-name
Specify the name of the option text message file used for the descriptions of the options on the menu you are creating.

The possible library values are:

*CMDLIB
The library specified on the Menu## command message file (CMDTXTMSGF) parameter is used to locate the option text message file.
*CURLIB
The current library for the job is used to locate the option text message file. If no library is specified as the current library for the job, the QGPL library is used.
library-name
Specify the name of the library where the option text message file is located.
Top

Replace menu (REPLACE)

Specifies whether the original display file is replaced by the new file.

*NO
The existing display file does not change.
*YES
The existing display file is replaced by the one being created. Other types of files are not replaced.

Note: The menu is not created if it has the same name and library as an existing program or message file.

If terminating errors are encountered, the existing display file is not replaced. If the display file already exists, the Authority (AUT) parameter is ignored and the authorities for the old display file are copied to the new menu display file that replaces it.

Top

Free form menu (FREEFORM)

Specifies whether the menu is created in free-format or in a fixed-format.

*NO
Free-format is not used. A fixed-format menu with two-columns is created. Option text message numbers correspond to the option numbers.
*YES
A free-format menu is created. If *YES is specified, a value must be specified on the Option text message file (OPTTXTMSGF) parameter. Option text message numbers correspond to the row numbers on the display.
Top

DDS listing (DDSLIST)

Specifies whether a partial or full DDS compile listing is provided.

*PARTIAL
A partial listing is provided.
*FULL
A full DDS listing and cross-reference are provided.
Top

Maximum devices (MAXDEV)

Specifies the maximum number of devices that can use the menu at one time.

5
The maximum number of devices is five.
number-of-devices
Specify the maximum number of devices that can use the menu at one time. Valid values range from 1 through 256.
Top

Authority (AUT)

Specifies the authority you are giving the users who do not have specific authority to the object, who are not on the authorization list, and whose user group has no specific authority to the object.

If OPTION(*CREATE) and REPLACE(*YES) are specified, and the display file already exists, the AUT parameter is ignored and the authorities for the old display file are copied to the new display file that replaces it.

*LIBCRTAUT
The authority for the object is the same as the value specified on the Create authority (CRTAUT) parameter of the library in which the object is being created. If the value specified on the CRTAUT parameter is changed, the new value will not affect any existing objects.
*USE
The user can perform basic operations on the object, such as running a program or reading a file. The user cannot change the object. Use (*USE) authority provides object operational (*OBJOPR), read (*READ), and execute (*EXECUTE) authorities.
*ALL
The user can perform all operations except those limited to the owner or controlled by authorization list management (*AUTLMGT) authority. The user can control the object's existence, specify the security for the object, change the object, and perform basic functions on the object. The user also can change ownership of the object.
*CHANGE
The user can perform all operations on the object except those limited to the owner or controlled by object existence (*OBJEXIST) and object management (*OBJMGT) authorities. The user can change and perform basic functions on the object. *CHANGE authority provides object operational (*OBJOPR) authority and all data authority. If the object is an authorization list, the user cannot add, change, or remove users.
*EXCLUDE
The user cannot access the object.
authorization-list-name
Specify the name of an authorization list to be used for authority to the object. Users included in the authorization list are granted authority to the object as specified in the list. The authorization list must exist when the object is created.
Top

To DDS source file (TOFILE)

Specifies the name and library of the source file in which to store the DDS source that is used to create the menu display. The source file need not already exist. If the user is authorized to the CRTSRCPF (Create Source Physical File) command, and the file does not exist, a new source file is created. This parameter is ignored if TOMBR(*NONE) is specified.

QDDSSRC
The source file, QDDSSRC, is used.
file-name
Specify the name of the source file in which to store the DDS source.

The possible library values are:

*CMDLIB
The library specified on the Menu## command message file (CMDTXTMSGF) parameter is used to locate the source file.
*CURLIB
The current library for the job is used to locate the file. If no current library entry exists in the library list, the QGPL library is used.
library-name
Specify the name of the library where the source file is located.
Top

To DDS source member (TOMBR)

Specifies the source file member name in which to store the DDS source. If the member does not exist, it is created. When the member name is the same as that of the display file name, and the to-file is QS36DDSSRC in the same library as the display file being created, the DDS is saved in this member only if the compile operation of the display file is successful. To guarantee that the DDS is saved, specify the name of some other source file, library, or member.

*NONE
The DDS source is not stored in the source file specified on the To DDS source file (TOFILE) parameter.
member-name
Specify the name of the source file member in which to store the DDS source. If the member does not exist, it is added. If it exists, it is replaced.
Top

User specified DBCS data (IGCDTA)

Specifies whether the display file contains double-byte character data.

*NO
The display file does not contain double-byte character data. Option text message IDs must begin with USR.
*YES
The display file or the message files contain double-byte character data. Option text message IDs can begin with USZ.
Top

Target Release (TGTRLS)

Specifies the release level of the operating system on which you intend to use the object being saved.

When specifying the target-release value, the format VxRxMx is used to specify the release, where Vx is the version, Rx is the release, and Mx is the modification level. For example, V5R3M0 is version 5, release 3, modification 0.

Valid values depend on the current version, release, and modification level of the operating system, and they change with each new release. You can press F4 while prompting this command parameter to see a list of valid target release values.

*CURRENT
The object is to be restored to, and used on, the release of the operating system currently running on your system. The object can also be restored to a system with any subsequent release of the operating system installed.
*PRV
The object is to be restored to the previous release with modification level 0 of the operating system. The object can also be restored to a system with any subsequent release of the operating system installed.
character-value
Specify the release in the format VxRxMx. The object can be restored to a system with the specified release or with any subsequent release of the operating system installed.
Top

Examples

CRTMSGFMNU   CMDTXTMSGF(MYMENU##)  REPLACE(*YES)  FREEFORM(*NO)

This command creates a menu by using a message file named MYMENU. The message file is located in the current library for the job and it contains the commands run for each menu option. Because no OPTTXTMSGF parameter is specified, the text of the command appears on the screen in place of the option text. REPLACE(*YES) specifies that an existing display file is replaced. The created display file is in a fixed-format, with options 1 through 24 arranged in two 12-element columns.

Top

Error messages

*ESCAPE Messages

SSP4464
Member &3 in file &1 in use, cannot be shared.
SSP5004
&1--This load member exists, but is not a $SFGR member.
SSP5005
&1 display file already exists.
SSP5011
&1 not allowed for display file name.
SSP5017
TOFILE library &1 not found.
SSP5019
Terminating errors in $SFGR input specifications.
SSP5027
TGTRLS(*PRV) allowed with changes only when existing display file created for previous release.
SSP5451
Existing file &1 is not a display file.
SSP5750
Command message file messages 1-24 contain only blank text.
SSP5751
Command text message file name must end with ##.
SSP5752
Command text message file library &1 not found.
SSP5753
Command text message file &1 not found.
SSP5754
Option text message file &1 not found.
SSP5755
Unable to create $BMENU work file.
SSP5756
Command message file name must be longer than 2 characters.
SSP5757
Command text message file has no MIC in 0001-0024 range
SSP5762
Option text message file name cannot be same as menu name.
SSP5770
Option text message file required for free format menu.
SSP5774
Command and option message files must not be the same.
SSP6124
Unexpected error occurred.
SSP7375
Error &1 received by &2 utility.
SSP8663
User not authorized to access &1.
SSP8679
Not authorized to access member &1.
Top