Command reference / msg

SNDRPY

Send Reply

Sends a reply message to the sender of an inquiry message, answering the message with the specified message reference key that was received at the specified message queue. A reply handling exit program registered for exit point QIBM_QMH_REPLY_INQ can accept, reject, or replace the reply. If the message queue is not allocated to the job, the command allocates it implicitly for its duration.

Allowed environments: *ALL. Positional parameters: 3.

Parameters

MSGKEY Message key

Specifies the message reference key of the message that the reply answers. This is a required parameter.

Type
*CHAR
Required
Yes
Length
4
Case
Uppercase

MSGQ Message queue

Specifies the message queue that received the inquiry message to be answered. This is a required parameter.

Type
*QUAL
Required
Yes
Case
Uppercase
*LIBL
All libraries in the thread's library list are searched until the first match is found.
*CURLIB
The job's current library is used to locate the queue; if none is set, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Message queue Message queue

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

RPY Reply

Specifies the reply the program sends in response to the inquiry message. Text is enclosed in apostrophes if it has blanks or special characters, or a CL variable holding the text can be given.

Type
*CHAR
Required
No
Default
*DFT
Length
132
Case
Mixed case

Suggested / special values: *DFT

*DFT
The default reply in the inquiry message's description is sent; if none is defined, the system default *N is used.

RMV Remove message

Specifies whether the inquiry message and its reply are removed from the message queue.

Type
*CHAR
Required
No
Default
*YES
Length
4
Case
Uppercase

Allowed values: *YES, *NO

*YES
The message and its reply are removed from the queue when the reply is sent.
*NO
The message and reply stay on the queue, so the inquiry can be received or displayed again, but it cannot be replied to more than once.

RJTDFTRPY Reject default reply

Type
*CHAR
Required
No
Default
*NOALWRJT
Length
9
Case
Uppercase

Allowed values: *NOALWRJT, *ALWRJT

CCSID Coded character set ID

Type
*UINT2
Required
No
Default
*JOB
Range
1 to 65535
Case
Uppercase

Suggested / special values: *HEX, *JOB

Examples

SNDRPY MSGKEY(&KEY) MSGQ(SMITH) RPY(YES)

Sends a reply of YES to the message whose reference key is in &KEY, received at message queue SMITH.

IBM command documentation

Generated from os/cl/catalog/SNDRPY.json and os/cl/help/SNDRPY.json.