Command reference / msg
CHGMSGD
Change Message Description
Changes an existing message description stored in a message file and stores the changes in that file for later use. The description remains until the message file is deleted, the message is removed with RMVMSGD, or it is changed again. The validity-checking parameters (TYPE, LEN, VALUES, SPCVAL, RANGE, REL, DFT) apply only when the message is sent as an inquiry or notify message that expects a reply. A message and its second-level text longer than 512 characters will not fit in the prompt, so enter the command from the Command Entry panel or a CL program. Specifying the alert option in the range CPx7B00 to CPx7BFF may cause unpredictable results.
Allowed environments: *ALL.
Positional parameters: 5.
Restrictions
- To change a message description, you must have change (*CHANGE) authority for the message file and read (*READ) authority for the library where the file is located.
Parameters
MSGID
Message identifier
Specifies the message identifier of the message being changed. It must be 7 characters in the format pppnnnn. This is a required parameter.
MSGF
Message file
Specifies the message file where the message description being changed is stored. Message file overrides in effect for the job are ignored. This is a required parameter.
*LIBL- All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB- The current library for the job is used to locate the message file; if there is no current library entry, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Message file
Message file
Library
Library
Suggested / special values:
*LIBL, *CURLIB
MSG
First-level message text
Specifies the new first-level text, up to 132 characters in apostrophes. Substitution variables &1 through &99 may be embedded. Changing the text replaces the entire message text.
Suggested / special values:
*SAME
*SAME- The message text is not changed.
SECLVL
Second-level message text
Specifies the message help, up to 3000 characters in apostrophes, which replaces the entire existing message help. The format control characters &N, &P and &B may be used, each followed by a blank.
Suggested / special values:
*SAME, *NONE
*SAME- The message help is not changed.
*NONE- There is no message help for this message description; any existing message help is removed.
SEV
Severity code
Specifies the severity code (00 through 99) of the message, indicating how severe the condition is; the higher the value, the more severe.
Suggested / special values:
*SAME
*SAME- The severity code of the message is not changed.
FMT
Message data fields formats
Suggested / special values:
*SAME, *NONE
Elements in order
Data type
Data type
Allowed values:
*QTDCHAR, *CHAR, *HEX, *SPP, *DEC, *BIN, *UBIN, *CCHAR, *UTC, *UTCD, *UTCT, *DTS, *SYP, *ITV
Length
Length
Suggested / special values:
*VARY
*VARY bytes or dec pos
*VARY bytes or dec pos
TYPE
Reply type
For an inquiry or notify message, specifies the type of valid reply to the message.
Allowed values:
*SAME, *CHAR, *DEC, *ALPHA, *NAME, *NONE
*SAME- The reply type is not changed.
*NONE- There is no reply validity checking; *NONE must also be specified for LEN.
*CHAR- Any character string is valid.
*DEC- Only a decimal number is a valid reply.
*ALPHA- Only an alphabetic character string is valid; blanks are not allowed.
*NAME- Only a simple name is valid; it must start with an alphabetic character.
LEN
Maximum reply length
For an inquiry or notify message, specifies the maximum reply length and, for decimal replies, the optional number of decimal positions.
Suggested / special values:
*SAME, *TYPE, *NONE
*SAME- The reply length is not changed.
*NONE- There is no reply validity checking; the existing length is removed. *NONE must also be specified for TYPE.
*TYPE- The maximum length is determined by the reply type: up to 132 for *CHAR and *ALPHA (32 if other validity checks are used), up to 15 digits for *DEC, and up to 10 for *NAME.
Elements in order
Length
Length
Decimal positions
Decimal positions
VALUES
Valid reply values
Specifies up to 20 values of which one can be a valid reply to an inquiry or notify message. Cannot be combined with RANGE or REL.
Suggested / special values:
*SAME, *NONE
*SAME- The existing values list is not changed.
*NONE- No list of reply values is specified; any existing values are removed.
SPCVAL
Special reply values
Specifies up to 20 from-value and to-value pairs. A matching reply is replaced by its to-value, and the special values may bypass the other reply validity checks.
Suggested / special values:
*SAME, *NONE
*SAME- The special values list is not changed.
*NONE- No special values are specified; any existing special values are removed.
Elements in order
Original from-value
Original from-value
Replacement to-value
Replacement to-value
RANGE
Range of reply values
Specifies the lower and upper limits for valid replies to an inquiry or notify message. Cannot be combined with VALUES or REL.
Suggested / special values:
*SAME, *NONE
*SAME- The upper and lower range limits are not changed.
*NONE- No range values are specified; any existing range values are removed.
Elements in order
Lower value
Lower value
Upper value
Upper value
REL
Relationship for valid replies
Specifies a relational operator and a value that a reply must satisfy to be valid. Cannot be combined with VALUES or RANGE.
Suggested / special values:
*SAME, *NONE
*SAME- The relationship is not changed.
*NONE- No relationship is specified; any existing relationship is removed.
*LT- Less than.
*LE- Less than or equal to.
*GT- Greater than.
*GE- Greater than or equal to.
*EQ- Equal to.
*NL- Not less than.
*NG- Not greater than.
*NE- Not equal to.
Elements in order
Relational operator
Relational operator
Allowed values:
*EQ, *LE, *GE, *GT, *LT, *NE, *NL, *NG
Value
Value
DFT
Default reply value
Specifies the default reply used when the receiver has set all messages to use default replies, or when a message is deleted from a queue with no reply. It must meet the validity-checking rules.
Suggested / special values:
*SAME, *NONE
*SAME- The default reply is not changed.
*NONE- No default reply is specified; any existing default reply is removed.
DFTPGM
Default program to call
Specifies the program that takes default action when this escape message is sent to a program that is not monitoring for it. It is ignored for messages not sent as escape messages.
Suggested / special values:
*SAME, *NONE
*SAME- The default program is not changed.
*NONE- No default program is specified; any existing one is removed.
*LIBL- All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB- The current library for the job is used to locate the program; if there is no current library entry, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Default program to call
Default program to call
Library
Library
Suggested / special values:
*LIBL, *CURLIB
DMPLST
Data to be dumped
Specifies the data dumped when this escape message is sent to a program that is not monitoring for it: message data field numbers and/or job dump values.
Suggested / special values:
*JOB, *JOBINT, *JOBDMP, *SAME, *NONE
*SAME- The dump list is not changed.
*NONE- There is no dump list; any existing dump list is removed.
*JOB- Same as the * value for JOB and *PRINT for OUTPUT on DSPJOB.
*JOBDMP- The data areas of the job are dumped as specified by DMPJOB.
*JOBINT- The internal machine data structures for the job are dumped to the machine error log as specified by DMPJOBINT.
ALROPT
Alert options
Specifies the alert option associated with messages sent to the QHST log and the system operator message queue.
Suggested / special values:
*SAME
*SAME- The alert option is not changed.
*NO- No alert is sent.
*IMMED- An alert is sent immediately, simultaneous with sending the message to QHST.
*UNATTEND- An alert is sent immediately only when *UNATTEND is set for ALRSTS on CHGNETA.
*DEFER- The alert is sent after local problem analysis; treated as *IMMED in some cases.
*NONE- For the resource name variable element: no message data field format number is passed with the alert identifier.
Elements in order
Alert type
Alert type
Allowed values:
*IMMED, *DEFER, *UNATTEND, *NO
Resource name variable
Resource name variable
Suggested / special values:
*NONE
LOGPRB
Log problem
Specifies, for IBM-supplied messages, whether an entry can be put into the problem log.
Allowed values:
*SAME, *NO, *YES
*SAME- The value is not changed.
*NO- An entry is not put in the problem log.
*YES- An entry is put in the problem log if there is an error log ID associated with the message.
CCSID
Coded character set ID
Specifies the CCSID that the MSG and SECLVL text is in. If neither is coded, the value changes the CCSID tag of the message description without conversion.
Suggested / special values:
*SAME, *JOB, *HEX
*SAME- The CCSID tag is not changed; any specified text is assumed to be in the CCSID of the text it replaces.
*JOB- The CCSID tag is changed to the CCSID of the job running the command; if MSG and SECLVL are not coded, the tag is not changed.
*HEX- The CCSID tag is changed to 65535, meaning the message is not converted when used.
Examples
CHGMSGD MSGID(UIN0115) MSGF(INV) MSG('Enter your name') SEV(55)
Changes the first-level message text and severity of message UIN0115 in message file INV; the rest of the description is unchanged.
CHGMSGD MSGID(UPY0047) MSGF(PAYLIB/TIMECARD) VALUES(*NONE) RANGE(0300 8900)
Removes the VALUES list of message UPY0047 and adds a RANGE of valid replies; the reply type and length are unchanged.
Generated from os/cl/catalog/CHGMSGD.json and os/cl/help/CHGMSGD.json.