Message switching
This function provides the user with a general-purpose message-switching capability while CICS® is running. The facility, which can route messages to one or more destinations, is initiated by the CMSG transaction, or a user-chosen replacement, read from the terminal.
Design overview
Message switching runs as a task under CICS. A terminal operator requests activation of this task by entry of the CMSG transaction identifier (or another installation-defined 4-character transaction identifier), followed by appropriate parameters. After it has been initiated, message switching interfaces with CICS basic mapping support (BMS) and CICS control functions.
Although message switching appears conversational to the terminal operator, the message switching task is terminated with each terminal response. Conversation is forced, if continuation is possible, by effectively terminating the transaction with an EXEC CICS RETURN TRANSID(xxxx) command, where xxxx is the transaction identifier specified in the task's TRANSACTION resource definition.
- If the first 4 characters of the terminal input/output area (TIOA) (not including a possible set buffer address (SBA) sequence from an IBM® 3270 Information Display System) do not match the transaction identifier for the task, this task must have started as part of a conversation in which a previous task has set up the next transaction identifier. A "C" immediately following the transaction identifier is also a forced continuation. In such a case, information has been stored in, and has to be retrieved from, temporary storage (using a record key of 1-byte X'FC', 4-byte terminal identifier, and 3-byte C"MSG") to allow the task to resume from where it was.
- The operands in the input TIOA are processed and their values and status are stored in the TWA.
- If a ROUTE operand specifies terminal list tables (TLTs) for a standard routing list, the program manager domain is called to load the requested TLTs.
- Message switching requests storage areas for:
- Building route lists (one or more segments, each of which has room for the number of destinations specified by MSRTELNG, an EQU within the program).
- Constructing a record to be placed in temporary storage.
- Providing the message text to BMS in any of the following situations:
- Message parts from previous inputs exceed the current TIOA size
- A message is completed in the current TIOA but has parts from previous inputs
- A heading has been requested but the message in the current TIOA is too close to TIOADBA to allow the header to be inserted.
- Message switching requests BMS routing functions by means of the DFHBMS TYPE=ROUTE macro. The message text is sent using DFHBMS TYPE=TEXTBLD, and completion of the message is indicated by DFHBMS TYPE=PAGEOUT. BMS returns the status of destinations and any error indications in response to the DFHBMS TYPE=CHECK macro.
- Message switching interfaces with BMS using DFHBMS TYPE=(EDIT,OUT) and with CICS terminal control using DFHTC TYPE=WRITE for the IBM 3270 Information Display System only, in providing responses to terminals. These can indicate normal completion, signal that input is to continue, or provide notification of input error.
- Like any other task, message switching has a task control area (TCA) in which values may be placed before issuing CICS macros, and from which any returned values can be retrieved after an operation. All values for the DFHBMS TYPE=ROUTE macro are placed in the TCA because they are created at execution time. The TWA is used for storing status information (partly saved in temporary storage across conversations) and space for work. The DFHMSP module is reentrant.
Control blocks
See the list of control blocks in Basic mapping support.
Modules
| Module | Description |
|---|---|
| DFHMSP | DFHMSP (the message switching program) is invoked by the CMSG transaction. DFHMSP’s purpose is to route a message entered at the terminal to one or more operator-defined terminals or to other operators. |
Exits
No global user exit points are provided for this function.
Trace
No trace points are provided for this function.
External interfaces
See Figure 1 for external calls made to other areas or domains.