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 in topic  CMSG command.

Full details of the options are given under CMSG command options.

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=(T001,T002)#
T=1500#
'THE TIME IS 1500 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:

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.

Canceling a message

You can cancel your current message-switching transaction by entering:

The first three examples in this list terminate the conversation and allow you to enter other transactions.

Message-switching continuation

The message-switching transaction appears to be conversational. Internally, a new task is created to process each message switching input.

If a task requires more information to complete the transaction, the current status of the transaction is saved in temporary storage, a response is sent to your terminal, and the task terminates with a requirement that the next task started be a message-switching task.

The saving of status replaces any previously saved status for any message-switching transaction from that terminal.

If a message-switching transaction completes successfully, or you have canceled it, an appropriate response is sent to your terminal, the status of the transaction is not saved, and the task terminates with no transaction restart specified. The saved status is always used by a message-switching task to continue a conversational input from your terminal. You can recall the saved status by entering the transaction identifier to which you have added C (for example CMSGC). You can include additional input, but it must follow CMSGC with no intervening spaces.

This method is useful because you can enter CANCEL to bypass errors in the current input and yet not allow the conversation to continue. You can then enter, for example CMSGC and then enter EOD, which puts the terminal in the conversation that prevailed at the time of the most recent input that has not been canceled or has not resulted in a message being routed. At this point you could also add an option if desired, for example CMSGCT=1030. (Note that there are no spaces between the transaction identifier, the C, or the following data.)

For example, enter:

CMSG R=(T40,T41)

and you receive:

   R OK CONTINUE INPUT,
   T=1500
   RT OK CONTINUE INPUT
   'THERE WILL BE ....... AT THE
   RT OK CONTINUE MSG
   MAIN NIO;FOMH PM VS;OGPTMOS SBR, CANCEL (see Note)
   TERMINATED BY OPERATOR
   CMSGCMAIN BUILDING ON CALIFORNIA AVENUE
   RT OK CONTINUE MSG
   IN ROOM 407',SEND
   MRTS OK MESSAGE HAS BEEN ROUTED

Note:
You can cancel and reenter instead of trying to correct the input. This terminates the entire transaction. To save the previously entered input, enter CMSGC to restart at the previously saved status point and continue the message.

Your terminal is free between a message-switching response and the next input, and if it is in TRANSCEIVE status, an automatically initiated task can be started on your terminal before you can continue the message-switching transaction.

Upon completion of this new task, even if it required a response from you, the message-switching transaction continues as if nothing had intervened. However, if you receive a response indicating that the intervening task has issued a RETURN, you must enter the transaction identifier followed by C to force continuation of the previous message-switching transaction.

Message delivery

You can deliver a message to a destination if the following conditions are met:

The processing and paging status of a terminal, which also affects delivery of eligible messages, is initially specified on the CEDA DEFINE TYPETERM command. You can change the status using the CEMT, CEST, and CEOT transactions.

When the processing status is RECEIVE or TRANSCEIVE, a message is sent automatically to the terminal when no transaction is attached to it.

When the processing status is TRANSACTION, you must request message delivery by entering a paging command, see CSPG--page retrieval.

A message is formed into one or more "pages", the size of which is predefined for a destination by the system programmer. The terminal processing status determines the delivery of the first or only page of a message. Succeeding pages, if any, are sent according to the paging status of the terminal as defined by the system programmer.

When the terminal is in PAGE status, you must request succeeding pages through a paging command.

When the terminal is in AUTOPAGE status, the complete message is printed.

Related tasks
Using CICS supplied transactions
CMSG--message switching
Subsystems and terminal systems
CMSG command
CMSG examples
[[ Contents Previous Page | Next Page Index ]]