Send Break Message (SNDBRKMSG)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Send Break Message (SNDBRKMSG) command is used to send an immediate message to one or more work station message queues. An immediate message is a message that is not predefined and is not stored in a message file. The command causes the message to be delivered always in break mode. The DSPMSG display is shown for the message when it is received, regardless of the setting of the message queue's delivery mode, severity, and break handling program. However, the message may not be displayed in some cases, depending on the BRKMSG job attribute. This command is primarily intended for the system operator's use.

Restrictions:

  1. This command can be used to send break messages to work station message queues only.
  2. This command cannot send inquiry messages (specified by MSGTYPE(INQ)) to multiple work stations.
Top

Parameters

Keyword Description Choices Notes
MSG Message text Character value Required, Positional 1
TOMSGQ To work station message queue Single values: *ALLWS
Other values (up to 50 repetitions): Qualified object name
Required, Positional 2
Qualifier 1: To work station message queue Name
Qualifier 2: Library Name, *LIBL
MSGTYPE Message type *INFO, *INQ Optional, Positional 3
RPYMSGQ Message queue to get reply Qualified object name Optional
Qualifier 1: Message queue to get reply Name, QSYSOPR
Qualifier 2: Library Name, *LIBL
CCSID Coded character set ID 1-65535, *HEX, *JOB Optional
Top

Message text (MSG)

Specifies the immediate message that is being sent. The text must be enclosed in apostrophes if it contains blanks or other special characters. A maximum of 512 characters can be specified.

Coded Character Set Identifier (CCSID) Considerations

The text supplied for the MSG parameter is assumed to be in the CCSID of the job running this command unless a coded character set identifier is supplied for the CCSID parameter. For more information about the message handler and its use of CCSIDs, see the i5/OS globalization topic collection in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.

This is a required parameter.

Top

To work station message queue (TOMSGQ)

Specifies one or more work station message queues to which the break message is sent. Only the names of work station message queues can be specified and only *LIBL or QSYS can be specified for the library value.

Single values

*ALLWS
The break message is sent to all work station and Personal Computer message queues. *ALLWS cannot be specified if *INQ is specified for the Message type (MSGTYPE) parameter.

Qualifier 1: To work station message queue

message-queue-name
Specify the name of the message queue to which the break message is to be sent.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
library-name
Specify the library where the message queue is located.
Top

Message type (MSGTYPE)

Specifies the type of message that is sent in break mode. Only informational or inquiry message types can be specified. Inquiry messages may require a response.

*INFO
An information only message is sent in break mode.
*INQ
An inquiry message is sent in break mode; the work station receiving the message is expected to reply to it. An inquiry message cannot be sent to multiple queues with only one command.
Top

Message queue to get reply (RPYMSGQ)

Specifies, only if an inquiry message is sent, the message queue that the work station user's reply is sent to.

Qualifier 1: Message queue to get reply

QSYSOPR
The replies to the break message are sent to the system operator's message queue, QSYSOPR.
message-queue-name
Specify the name of the message queue to which a reply to the break message is sent. Only a user or work station message queue can be specified.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
library-name
Specify the library where the message queue is located.
Top

Coded character set ID (CCSID)

Specifies the coded character set identifier (CCSID) that the specified message text is in. The text supplied by the MSG parameter is assumed to be in the CCSID supplied by this parameter. For more information about the message handler and its use of CCSIDs, see the i5/OS globalization topic collection in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.

*JOB
The message text is assumed to be in the CCSID of the job running this command.
*HEX
The message text is not converted. CCSID 65535 is used.
coded-character-set-identifier
Specify a valid CCSID in which you want your message text to be considered in. Valid values range from 1 through 65535. See the Globalization information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter for a list of valid CCSID values. This command will validate the CCSID.
Top

Examples

Example 1: Sending a Message

SNDBRKMSG   MSG('Inventory application shuts down at 4:00 PM.')

This command sends the message 'The inventory application shuts down at 4:00 pm today.' to all work station message queues. If the work station is signed on, the message will be delivered in break mode regardless of the delivery attribute setting of those message queues. The message is also added to the work station message queues of those work stations that are not signed on.

Example 2: Sending an Immediate Message

SNDBRKMSG   MSG('Your printed output is ready.')
            TOMSGQ(GEORGEMSGQ)

This example shows a typical use of the SNDBRKMSG command by the system operator to send an immediate message to a work station user.

Top

Error messages

*ESCAPE Messages

CPF2428
Message queue parameter is not valid.
CPF2469
Error occurred when sending message&1.
CPF247E
CCSID &1 is not valid.
CPF9838
User profile storage limit exceeded.
Top