Send Message (QEZSNDMG) API


  Optional Parameter Group 1:


  Optional Parameter Group 2:


  Optional Parameter Group 3:


  Default Public Authority: *USE

  Threadsafe: No


The Send Message (QEZSNDMG) API sends a message to one or more users or display stations and optionally shows the Operational Assistant Send a Message display before sending the message. Parameters can be specified, providing the ability to display initial values (defaults) to the user. Parameters determine:

This API combines the functions of the Send Message (SNDMSG) and Send Break Message (SNDBRKMSG) commands. In addition, it provides the ability to:

This API can be called with or without parameters. If parameters are specified, at least nine parameters are required. If this API is called in a batch job, parameter 10, Show Send a Message display, must be specified with a value of N. This will cause the message to be sent without using the Send a Message display.

Refer to Network Management APIs for information on alert messages. Refer to Message Handling APIs for information on the message handling APIs.


Authorities and Locks

Special Authority (*ALL or *ALLACT value on parameter 5)
*JOBCTL
SNDBRKMSG Command (*BREAK delivery mode on parameter 2)
*USE
Message Queue Authority
*OBJOPR and *ADD
Message Queue Library Authority
*EXECUTE

Send a Message Display

Send a Message Display


Optional Parameter Group 1

Message type
INPUT; CHAR(10)

The type of message to send. The value you specify determines the default for the Message needs reply prompt on the Send a Message display (N for *INFO and Y for *INQ). You must specify one of these values:


Delivery mode
INPUT; CHAR(10)

The delivery mode of the message. The value you specify determines the default for the Interrupt user prompt on the Send a Message display (Y for *BREAK and N for *NORMAL). If the user is not authorized to send a break message, *NORMAL is used regardless of the value you specify. You must specify one of these values:


Message text
INPUT; CHAR(*)

The complete text of the message. The text you specify is displayed as the default on the Send a Message display. This must not be blank if used in a batch job or if the Show Send a Message display parameter is N.

Length of message text
INPUT; BINARY(4)

The length of the message text, in bytes. Valid values are 0 through 494. This must be greater than 0 if the API is used in a batch job or if the Send a Message display is not to be shown.

List of user profile or display station names
INPUT; ARRAY OF CHAR(10)

A list of 0 through 299 user profile or display station names to which the message is being sent. The list you specify is shown as the default on the Send a Message display.

The name type indicator parameter indicates whether the names in the list are user profile names or display station names; the default is user profile names. At least one name must be specified if the API is used in a batch job or if the Send a Message display is not to be used.

The message is sent to the user profile or display station message queue. To specify other user message queues, use one of the following special values:

If the list specifies display station names, the library list will be used to find the work station message queues.

Note: *JOBCTL special authority is required to use the *ALL or *ALLACT value in this parameter.

Number of user profile
or display station names
INPUT; BINARY(4)

The number of user profile or display station names specified. Valid values are 0 through 299. When you use the special value *ALL for the list of user profile or display station names parameter, specify 1. This must be greater than 0 if the API is used in a batch job or if the Send a Message display is not to be used.

Message sent indicator
OUTPUT; BINARY(4)

Whether the user pressed F10 (Send message) to send one or more messages from the Send a Message display. One of the following values is returned:


Function requested
OUTPUT; BINARY(4)

The function that the user requested when exiting the Send a Message display. One of the following values is returned:


Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Optional Parameter Group 2

Show Send a Message display
INPUT; CHAR(1)

Whether or not to show the Send a Message display before sending the message. If this parameter is used, one of the following values must be specified;


Qualified message queue name
INPUT; CHAR(20)

The name of the message queue that is to receive the reply for inquiry-type messages. The first 10 characters contain the message queue name, and the second 10 characters contain the library name. If this parameter is blank or not specified, the reply will be sent to the message queue specified in the user profile of the sender. This parameter is ignored if the message type parameter is not *INQ. If this parameter is used, you can use these special values for the library name:


Name type indicator
INPUT; CHAR(4)

The type of names in the list. If this parameter is used, one of the following values must be specified:


Optional Parameter Group 3

Coded character set identifier
INPUT; BINARY(4)

The coded character set identifier (CCSID) that the immediate message text is in. The following values are allowed:


Error Messages



API introduced: V2R1

[ Back to top | Operational Assistant APIs | APIs by category ]