Change Reply List Entry (CHGRPYLE)

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

The Change Reply List Entry (CHGRPYLE) command changes a system reply list entry. Any of the attributes of a reply list entry can be changed, except for the sequence number.

The reply list is used as a source for automatic responses to predefined inquiry messages.

The reply list is only used when an inquiry message is sent by a job that has the system reply list attribute INQMSGRPY(*SYSRPYL) specified. The INQMSGRPY attribute can be changed with the CHGJOB command.

New entries may be added to the reply list with the Add Reply List Entry (ADDRPYLE) command; entries can be removed with the Remove Reply List Entry (RMVRPYLE) command. The entire list of entries can be shown with the Work with Reply List Entry (WRKRPYLE) command; from the display presented you can add, change, and remove individual entries.

Restrictions:

  1. This command is shipped with public *EXCLUDE authority and the QPGMR user profile has private authority to use the command.
  2. To use this command, you must be signed on as QPGMR, or have *USE special authority.
Top

Parameters

Keyword Description Choices Notes
SEQNBR Sequence number 1-9999 Required, Positional 1
MSGID Message identifier Character value, *SAME, *ANY Optional
CMPDTA Compare data Element list Optional
Element 1: Comparison data Character value, *SAME, *NONE
Element 2: Message data start position 1-999, *SAME, *NONE
RPY Message reply Character value, *SAME, *DFT, *RQD Optional
DUMP Dump the sending job *SAME, *NO, *YES Optional
CCSID Coded character set ID 1-65535, *SAME, *HEX, *JOB Optional
Top

Sequence number (SEQNBR)

Specifies the sequence number of the reply list entry being changed. The message identifier and message data of an inquiry message are matched against reply list entry message identifiers and comparison data in ascending sequence number order. The search ends when a match occurs or the last reply list entry is passed.

This is a required parameter.

1-9999
Specify a sequence number from 1 to 9999. Duplicate sequence numbers are not allowed.
Top

Message identifier (MSGID)

Specifies the inquiry message identifiers for which automatic system action is taken. The message identifier can be specific or generic in scope. Only predefined messages (messages known to the system by a message identifier) can be matched by reply list entries; immediate messages cannot be used for comparison.

*SAME
The message identifier is not changed.
*ANY
This reply list entry matches any message identifier. Unless this reply list entry has comparison data specified, any reply list entry with a higher sequence number than this one is ignored.
message-identifier
Specify a message identifier to compare with the message identifier of an inquiry message. The message identifier must be 7 characters in length and in the following format: pppnnnn

The first 3 characters (ppp) must be a code consisting of one alphabetic character followed by two alphanumeric (alphabetic or decimal) characters. The last 4 characters (nnnn) must consist of the decimal numbers 0 through 9 and the characters A through F.

Top

Compare data (CMPDTA)

Specifies the comparison data that is used to determine whether this entry matches an inquiry message. If the identifier of the inquiry message matches the message identifier of this reply list entry, then the message data specified for the inquiry message is compared to this data.

Element 1: Comparison data

*SAME
The comparison data is not changed.
*NONE
No comparison data is specified. If the inquiry message has the specified identifier, the action specified by this reply list entry is taken.
'comparison-data'
Specify a character string of no more than 28 characters (enclosed in apostrophes if blanks or other special characters are included). This string is compared with a string of the same length in the message data of the inquiry message, beginning with the first character (if no start value has been specified).

Element 2: Message data start position

*SAME
The message data start remains the same.
message-data-start
Specify the starting character position in the message's replacement text (maximum value not to exceed 999) where the comparison data is to be compared with the replacement text. A start value is not valid without a specification of comparison data.

Coded Character Set Identifier (CCSID) Considerations

The text supplied for the CMPDTA parameter that corresponds to the *CCHAR type field is assumed to be in the CCSID of the job running this command,unless the CCSID parameter is coded. For more information about the *CCHAR type field see the Add Message Description (ADDMSGD) command.

Top

Message reply (RPY)

Specifies how to reply to an inquiry message that matches this reply list entry. The reply specified in this reply list entry is automatically sent by the system without requiring user intervention; the inquiry message does not cause any job to be interrupted or notified when the message arrives at the message queue.

*SAME
The reply action is not changed.
*DFT
The default reply to the inquiry message is sent.
*RQD
The inquiry message requires an explicit reply. No reply is automatically sent.
'message-reply'
Specify a character string of no more than 32 characters (enclosed in apostrophes if blanks or other special characters are included), sent as a reply to the inquiry message.
Top

Dump the sending job (DUMP)

Specifies whether the contents of the job that sent the inquiry message are printed (dumped) when the inquiry message matches this reply list entry.

*SAME
The dump attribute of the reply list entry is not changed.
*NO
The job is not dumped.
*YES
The job is dumped before control returns to the program sending the message.
Top

Coded character set ID (CCSID)

Specifies the coded character set identifier (CCSID) of the part of the CMPDTA that is of the type *CCHAR.

When an inquiry message is sent to a job that is using the system reply list, the *CCHAR compare data is converted from the CCSID specified by the send function to the CCSID of the CMPDTA stored on the reply list. This is done before the data is compared.

All other compare data is not converted before a comparison is made. For more information about the message handler and its use of CCSIDs, see the Globalization topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.

Note: When specifying a CCSID other than *HEX, all the CMPDTA specified is converted from that CCSID to the job CCSID when displayed on the Work with Reply List Entries panel. This occurs even when all CMPDTA does not correspond with *CCHAR data; therefore, when using a CCSID other than *HEX, specifying the length of the *CCHAR data or any other data field is not recommended.

*SAME
The CCSID associated with the CMPDTA is not changed. If the CMPDTA is being changed, the part of the CMPDTA that is of type *CCHAR is assumed to be in the same CCSID as the CMPDTA being replaced.
*JOB
If the CMPDTA is being changed, the part of the CMPDTA that is of type *CCHAR is assumed to be in the CCSID of the JOB running this command. If the CMPDTA is not changing, the CCSID associated with the CMPDTA is not changed.
*HEX
The CCSID associated with the CMPDTA is changed to 65535. No conversion occurs before the replacement data is compared with the CMPDTA.
coded-character-set-identifier
The CCSID associated with the CMPDTA is assumed to be the CCSID value specified.
Top

Examples

Example 1: Changing the Message Identifier

CHGRPYLE   SEQNBR(20)  MSGID(RPG1299)

This command changes the message identifier of the reply list entry (sequence number 20) to RPG1299. Whenever an RPG1299 inquiry message is sent by a job that is using the reply list, the action previously specified for entry 20 is taken.

Example 2: Changing the Comparison Data

CHGRPYLE   SEQNBR(25)  CMPDTA(MYPROGRAM)

This command changes the comparison data of the reply list entry whose sequence number is 25 to MYPROGRAM. This entry only matches inquiry messages whose message data begins with MYPROGRAM. For example, if this entry were for the RPG1200 messages, the entry is used only when the RPG program from which the message was sent has message data named MYPROGRAM.

Example 3: Changing the Reply Sent

CHGRPYLE   SEQNBR(30)  RPY(C)

This command changes the reply sent for the reply list entry whose sequence number is 30 to C. Whenever an inquiry message which matches the message identifier and comparison data previously defined for this entry is sent by a job that is using the reply list, a 'C' reply is automatically sent.

Example 4: Printing the Job Contents

CHGRPYLE   SEQNBR(40)  DUMP(*YES)

This command changes the attribute defined for the DUMP parameter for the reply list entry whose sequence number is 40. Whenever this entry matches an inquiry message, the sending job is dumped before control returns to the sending program.

Example 5: Sending a Manual Reply

CHGRPYLE   SEQNBR(45)  MSGID(CPA5300)  CMPDTA(*NONE)
           RPY(*RQD)  DUMP(*NO)

This command changes some of the attributes of the reply list entry whose sequence number is 45. Whenever a CPA53xx inquiry message is sent by a job that is using the reply list, a manual reply must be issued. If the message queue to which the inquiry is sent is in break mode, the message interrupts the job. The sending job is not dumped.

Example 6: Sending an Automatic Reply

CHGRPYLE   SEQNBR(9999)  MSGID(CPA3917)  RPY(R)

This command changes the reply list entry whose sequence number is 9999. Whenever a CPA3917 inquiry message is sent by a job that is using the reply list, an 'R' reply is automatically sent. The inquiry does not break into the message queue, and no opportunity is given to reply to the message manually.

Top

Error messages

*ESCAPE Messages

CPF2435
System reply list not found.
CPF2436
System Reply List entry not added or changed.
CPF247E
CCSID &1 is not valid.
CPF2499
Message identifier &1 not allowed.
CPF2556
Sequence number &1 not defined in system reply list.
CPF2557
System reply list damaged.
CPF2558
System reply list currently in use.
Top