CL Command Reference - ADDRPYLE
CL Command List > ADDRPYLE Reference
Description:
The Add Reply List Entry (ADDRPYLE) command is used to add an entry to the system-wide automatic inquiry message reply list. The automatic message reply list is the source for default responses to inquiry messages. Each entry in the inquiry message list specifies both a message identifier and the reply that is sent when that message is sent as an inquiry message. The entry may also include comparison data, which further qualifies the message identifier. The message identifier may be specific or generic in scope. One of the following actions may be taken when one of the specific inquiry messages is issued:
. The default reply specified in the inquiry message file is sent to the message reply queue specified when the inquiry message was sent.
. A specific reply to the inquiry message is sent to the message reply queue specified when the inquiry message was sent.
. A manual reply to the inquiry message may be required from the operator.
The entry may also specify the dumping of information associated with the job that is sending the inquiry message.
The reply list is used only when an inquiry message is sent by a job that has the inquiry message reply attribute specified as INQMSGRPY(*SYSRPYL). The INQMSGRPY attribute can be changed by using the Change Job Description (CHGJOBD) command.
Specific attributes of a reply list entry can be changed by using the Change Reply List Entry (CHGRPYLE) command. Each reply list entry remains in the list until it is removed by the Remove Reply List Entry (RMVRPYLE) command. The list can be shown by using the Work with Reply List Entry (WRKRPYLE) command.
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: Reply Automatically Sent
ADDRPYLE SEQNBR(10) MSGID(RPG1241) RPY(G)
This command adds a reply list entry to the reply list for message identifier RPG1241 (database record not found). Whenever a RPG1241 inquiry message is sent by a job that is using the reply list, a reply of ¡¯G¡¯ is automatically sent. The inquiry does not cause a job that has allocated the message queue to be interrupted or notified when the inquiry arrives, and no opportunity is given to reply to the message. The sending job does not have a job dump processed.
Example 2: Default Reply is sent; Job Dump Processed
ADDRPYLE SEQNBR(25) MSGID(RPG1200) RPY(*DFT) DUMP(*YES)
This command adds a generic reply list entry to the reply list for all RPG12xx messages. Whenever an RPG12xx inquiry message is sent by a job that is using the reply list, the equivalent to DSPJOB OUTPUT (*PRINT) is automatically generated. The default reply will automatically be sent. This is either the default reply specified in the message description or (if none is specified in the message description) the system default reply. The inquiry does not cause a job that has allocated the message queue to be interrupted or notified when the inquiry arrives, and no opportunity is given to reply to the message. The sending job is dumped before control returns to the sending program. Note that because of the sequence numbers, the entry added by the previous example overrides this entry for message identifier RPG1241.
Example 3: Adding a Generic Reply List Entry
ADDRPYLE SEQNBR(30) MSGID(RPG0000) RPY(D) DUMP(*YES)
This command adds a generic reply list entry to the reply list for all RPG messages. Whenever an RPG inquiry message is sent by a job that is using the reply list, a reply of ¡¯D¡¯ is sent automatically. The inquiry does not cause a job that has allocated the message queue to be interrupted or notified when the inquiry arrives, and no opportunity is given to reply to the message. (If a value of D is not valid for a particular RPGxxxx message, the user must reply as if *RQD were specified for the RPY parameter.) The sending job is dumped before control returns to the sending program. Note that the entries added by the previous two examples will override this entry for all RPG12xx messages.
Example 4: System Reply List for Spooled Output
This command illustrates how to use the system reply list for spooled output for device QSYSPRT. The file and library name for spooled output is QSYS/QPSPLPRT.
When compare value is specified, it is compared to the message data beginning with replacement variable &1. If the significant field appears in replacement variable &3, the compare value must include a value for replacement variables &1 and &2, or a message data start value may be entered to begin the comparison with replacement variable &3.
Example 5: Adding Reply List Entry For Any Message Identifier
ADDRPYLE SEQNBR(9999) MSGID(*ANY) RPY(*RQD) DUMP(*YES)
This command adds a reply list entry to the reply list for any message identifier. This entry applies to any predefined inquiry message that is not matched by an entry with a lower sequence number. A manual reply to the inquiry message is required for any predefined inquiry message not matched by a previous entry. If the message queue to which the inquiry message is sent is in break mode, the message interrupts. The job that sent the inquiry message is dumped (equivalent to DSPJOB OUTPUT(*PRINT)).
Example 6: Using Comparison Data
ADDRPYLE SEQNBR(5) MSGID(CPA5316) CMPDTA(QSYSPRT 21) RPY(I)
DUMP(*NO)
Assume that the message CPA5316 is sent to QSYSOPR with the message replacement text of TESTEDFILETSTLIBRARYQSYSPRT; because there is a match for MSGID, the message replacement text starting in position 21 (message data start) is tested by comparing it with the comparison data (for the length of the comparison data). This is a match because QSYSPRT = QSYSPRT, and therefore the reply of ¡¯I¡¯ is sent.