CL Command Reference - SNDRPY
CL Command List > SNDRPY Reference
Description:
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.
Examples:
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.