CMSG—message switching
Chapter 19. CMSG—message switching
Use CMSG to send messages from your terminal to one or
more destinations.
The destination may be:
Another terminal
Another terminal, but only when a specified operator is
signed on at that terminal
Another terminal, but only when the operator signed on
at that terminal is in a specified class
Another operator (CICS locates the operator, if currently
signed on, and sends the message to that operator’s
terminal)
All terminals
All terminals with operators signed on in specified
classes
Any combination of these destinations.
You can specify that the message is to be sent at some
future time. If the message cannot be sent, your terminal is
notified.
In addition, standard routing lists can be provided using the
terminal list table (TLT), which can include terminal and
operator identifiers. Multiple routing lists can be specified at
the time the message is entered, and individual destinations
can be deleted from, or added to, the lists at this time.
CICS message switching is provided by a service program
invoked by a user-defined transaction identifier that must be
defined to CICS. This transaction identifier can be CMSG or
any user-defined 4-character transaction identifier. CMSG is
the transaction identifier assumed throughout this book.
You can extend message switching to include predefined
messages and even complete message-switching transaction
input formats.
The terminals from which message switching is initiated, and
all terminals of message destinations, must support BMS.
Routed messages can be directed to a terminal, including the
transaction terminal, that supports partitions. However, such
messages reset the terminal to “base” state.
Sending a message
To send a message to another terminal or terminals, enter
the transaction identifier, CMSG, followed by the applicable
options, as shown in the syntax diagram on page
“Command syntax” on page 234.
Full details of the options are given under “CMSG command
options” on page 234.
After entering CMSG, you must include at least the message
text, a destination (ROUTE, or OPCLASS, or both), and the
option SEND (which you can abbreviate to S). For example:
CMSG 'GOOD MORNING',R=ALL,S
sends the message ‘GOOD MORNING’ to all terminals.
If all is well, your message is sent, and the response
MESSAGE HAS BEEN ROUTED
is returned to your terminal.
This response is received for the normal completion of a
message-switching transaction. It means that the message
has been successfully routed to its destination but does not
reflect any delivery status.
You can use backspace characters in your input.
New-line characters (or carriage returns on a hard-copy
terminal) that are not part of the message are changed to
commas, unless they appear at the beginning or end of the
input, in which case they are deleted. In this way, you can
use NL characters as option separators, instead of commas.
For example, on a display device, you could enter:
CMSG R=(T1,T2)#
T=15#
'THE TIME IS 15 HOURS'#
S@
where the ENTER key.
You can enter the options, except SEND and CANCEL (one
of which must be entered last), in any order after CMSG and
one or more spaces. You can abbreviate every option,
except CANCEL, to a single character, and you can include
one or more options in a single input. If you specify two or
more options, you must follow each by a comma, except the
last, which must be followed by a space or by an end-of-data
(EOD) condition indicating the end of your input. Any data
following a space in the same input is ignored.
To mark the end of a single input:
Press the ENTER key on display devices such as the
IBM 3270
Press carriage return for hardcopy terminals such as the
IBM 2741.
To maintain the conversation with a terminal, the status of all
inputs, except the final input which includes the SEND
option, is saved in a single temporary-storage record.
A message-switching transaction remains conversational until
ended. This means that all input (even other transaction
identifiers) is passed to the message-switching program. You
must end a message-switching transaction (possibly involving
multiple inputs) before you can start a different transaction.
Copyright IBM Corp. 1982, 1999 231