CL Command Reference - SNDMSG

CL Command List > SNDMSG Reference

Description:

The Send Message (SNDMSG) command is used by a display station user to send an immediate message from his display station to one or more message queues. (An immediate message is a message that is not predefined and is not stored in a message file.) The message can be sent to the system operator, to other display station users, to a user¡¯s message queue, all currently active users¡¯ message queues or to the system history log, QHST. The sender can require a reply from the message receiver. The primary users of this command are display station users and the system operator.

Restrictions:

1. You must have object operational (*OBJOPR) and add (*ADD) authorities for the message queue.

2. You must have use (*USE) authority for the specified message queues and *USE authority for the libraries in which they are located.

3. The SNDMSG command only allows a message of up to 512 characters of first-level message text to be sent.

4. This command can only send inquiry messages (specified by MSGTYPE(*INQ)) to one message queue or to two message queues if one of the queues is *HSTLOG.


Examples:

Example 1: Sending Message to User Message Queue

SNDMSG MSG(¡¯Do you want to update INV now?¡¯) TOUSR(JONES)
MSGTYPE(*INQ) RPYMSGQ(SMITH)

This command sends a message to the user message queue JONES. When the message is answered, the reply will be sent to the message queue SMITH.



Example 2: Sending Message to System¡¯s History Log

SNDMSG MSG(¡¯Errors on PAYROLL cost me 1 hour of run time.¡¯)
TOMSGQ(QHST)

This command is used by the system operator to send an informational message to the system¡¯s history log, QHST, through the log¡¯s message queue, which has the same name.



Example 3: Sending Message to System Operator

SNDMSG MSG(¡¯Please make 2 copies of file LABORSTAT.¡¯)
TOMSGQ(QSYSOPR)

This command shows a typical use of the SNDMSG command by a display station user. The user is sending the message to the system operator.



Example 4: Sending Message that Requires a Reply

SNDMSG MSG (¡¯How long will the system be up today?¡¯)
TOMSGQ(*SYSOPR) MSGTYPE(*INQ)

This command sends an inquiry message to the system operator. The message requires a reply. The system operator displays the message by using the DSPMSG command and enters the reply on the display. The reply is then sent to the display station user¡¯s work station message queue. The display station user enters another DSPMSG command to display the reply.