CL Command Reference - CHGRPYLE

CL Command List > CHGRPYLE Reference

Description:

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.



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.