Command reference / msg

CRTMSGF

Create Message File

Creates a user-defined message file for storing message descriptions. Store it in a library that all users who need the predefined messages can access. The system ships IBM message files in library QSYS, such as QCPFMSG for system messages and QRPGMSG for RPG messages.

Allowed environments: *ALL. Positional parameters: 2.

Parameters

MSGF Message file

Specifies the message file to be created. This is a required parameter. The library qualifier defaults to *CURLIB.

Type
*QUAL
Required
Yes
Case
Uppercase
*CURLIB
The job's current library is used; if none is in the library list, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Message file Message file

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

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

Suggested / special values: *CURLIB

TEXT Text 'description'

Specifies the text that briefly describes the object. No more than 50 characters.

Type
*CHAR
Required
No
Default
*BLANK
Length
50
Case
Uppercase

Suggested / special values: *BLANK

*BLANK
No text is specified.

SIZE File size

Specifies the initial storage size, the increment size, and the maximum number of increments, in KB. If SIZE is not specified, SIZE(10 2 *NOMAX) is assumed.

Type
*ELEM
Required
No
Case
Uppercase
*NOMAX
The number of increments is not limited by the user; the system determines the maximum size.
Elements in order

Initial storage size Initial storage size

Type
*INT4
Required
No
Default
10
Case
Uppercase

Increment storage size Increment storage size

Type
*INT4
Required
No
Default
2
Case
Uppercase

Maximum increments Maximum increments

Type
*INT4
Required
No
Default
*NOMAX
Case
Uppercase

Suggested / special values: *NOMAX

AUT Authority

Specifies the authority given to users who have no specific authority, are not on an authorization list, and whose group profiles have no specific authority.

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

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

*LIBCRTAUT
Uses the CRTAUT value of the library containing the new file, at creation time.
*CHANGE
All operations except those limited to the owner or to object existence and management authorities.
*ALL
All operations except those limited to the owner or AUTLMGT authority, including changing ownership.
*USE
Basic operations such as running a program or reading a file; the user cannot change the object.
*EXCLUDE
The user cannot access the object.

CCSID Coded character set ID

Specifies the CCSID associated with the message file. This CCSID overrides the CCSID of the message description.

Type
*UINT2
Required
No
Default
*HEX
Range
1 to 65535
Case
Uppercase

Suggested / special values: *HEX, *MSGD, *JOB

*HEX
The message file CCSID is 65535; no conversions occur when adding or retrieving message descriptions.
*MSGD
The message file CCSID is 65534; the CCSID of each message description is used when retrieving text.
*JOB
The file's CCSID is the CCSID of the job calling the command.

Examples

CRTMSGF MSGF(INVLIB/INVMSGS) TEXT('Inventory Application Messages')

Creates message file INVMSGS in library INVLIB for inventory application messages. AUT is defaulted, so all users get *CHANGE authority and can retrieve messages from the file.

IBM command documentation

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