Where allowed to run: All environments (*ALL) Threadsafe: Yes |
Parameters Examples Error messages |
The Send Reply (SNDRPY) command sends a reply message to the sender of an inquiry message. The message that is answered is the one having the specified message reference key that was received at the specified message queue.
A reply handling exit program can be registered in the system registration facility for exit point QIBM_QMH_REPLY_INQ. A reply handling exit program can accept, reject or replace a reply value. If the reply is rejected by an exit program, diagnostic message CPD2476 (Reply rejected by a reply handling exit program) is sent to the program running this SNDRPY command. This is followed by an escape message CPF2422 (Reply not valid). If the reply is replaced by an exit program, the send reply function sends a diagnostic message to itself. The message is CPD2479 (Reply handling exit program requested to replace a reply value). After the reply is sent, CPF2458 (Reply replaced by a reply handling exit program) will be sent as a diagnostic message and a status message to the program running this SNDRPY command. The status message can be monitored if the program needs to be aware of the condition when a reply value other than what was specified was sent.
If the specified message queue is not allocated to the job in which this command is entered, it is implicitly allocated by this command for the duration of the command.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
MSGKEY | Message key | Character value | Required, Positional 1 |
MSGQ | Message queue | Qualified object name | Required, Positional 2 |
Qualifier 1: Message queue | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
RPY | Reply | Character value, *DFT | Optional, Positional 3 |
RMV | Remove message | *YES, *NO | Optional |
RJTDFTRPY | Reject default reply | *NOALWRJT, *ALWRJT | Optional |
CCSID | Coded character set ID | 1-65535, *HEX, *JOB | Optional |
Top |
Specifies the message reference key of the message that the reply answers.
This is a required parameter.
Top |
Specifies the message queue that received the inquiry message to be answered.
This is a required parameter.
Qualifier 1: Message queue
Qualifier 2: Library
Top |
Specifies the reply that the program sends as a response to the inquiry message.
Coded Character Set Identifier (CCSID) Considerations
If the inquiry message that this reply is being sent to is an immediate message, the text supplied for the RPY parameter is assumed to be in the CCSID of the job running this command unless a coded character set identifier is supplied in the CCSID parameter. If the inquiry message that this reply is sent to is a predefined message, the text supplied in the RPY parameter is assumed to be 65535 and is not converted. 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.
Top |
Specifies whether the inquiry message and its reply are removed from the specified message queue.
Top |
Specifies whether a reply handling exit program will be allowed to reject a default reply. A default reply is requested by using blanks as the value for the reply parameter. A reply handling exit program can be registered via the system registration facility for exit point QIBM_QMH_REPLY_INQ. If a default reply is not being sent, this parameter is ignored and a reply handling exit program can reject or replace the reply value.
Top |
Specifies the coded character set identifier (CCSID) that the supplied reply text is in. If the inquiry message that this reply is sent to is a predefined message, this parameter is ignored and the text supplied for the RPY parameter is assumed to be 65535 and is not converted. 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.
Top |
SNDRPY MSGKEY(&KEY) MSGQ(SMITH) RPY(YES)
This command sends a reply of YES to the message whose reference key is specified by &KEY, which was received at message queue SMITH. Because the reply contains only one word, the reply does not have to be enclosed in apostrophes.
Top |
*ESCAPE Messages
*STATUS Messages
Top |