Message types
An operator at a terminal can send four kinds of messages to IMS TM.
The destination of an IMS TM message identifies which kind of message is being sent:
- Another terminal. A logical terminal name in the first 8 bytes means that this is a message switch destined for another terminal. For a user at a logical terminal to send a message to another logical terminal, the user enters the name of the receiving logical terminal followed by the message. The IMS TM control region routes the message to the specified logical terminal. This kind of message does not result in the scheduling of any activity in a message processing program (MPP).
- An application program. A transaction code in the first 8 bytes means that the message is destined for an application program. IMS TM uses a transaction code to identify MPPs and transaction-oriented batch message processing programs (BMPs). To use a particular application program to process requests, the user enters the transaction code for that application program.
- IMS TM. A
/
(slash) in the first byte means that the message is a command destined for IMS TM. - Message switch service. A system service DFSAPPC request is destined for the message switch service.
An application program can send three kinds of messages:
- Commands. A
⁄
in the first byte of the message text means that the message is a command for IMS TM. Programmers design applications to issue commands when they want a program to perform tasks that an operator at a terminal usually performs. This is called automated operator interface (AOI) and is described in IMS Version 15.3 Communications and Connections and IMS Version 15.3 Operations and Automation.Use the
CMD
call to issue commands. Do not use theISRT
call for issuing commands, because a message created withISRT
can contain a slash in the first byte without being a command. - Messages to logical terminals by specifying a logical terminal name.
- Program-to-program switches using a transaction code.
The messages that your program receives and sends are made up of segments. Use a
GU
call to retrieve the first segment of a new message, and use GN
calls to retrieve the remaining segments of the message. The following figure shows three messages.
Message A contains one segment, message B contains two segments, and message C contains three
segments.

To retrieve message A, you only have to issue a GU
call. To retrieve messages B
and C, issue one GU
call to retrieve the first segment, then a GN
call for each remaining segment. This assumes that you know how many segments each message contains.
If you do not know this, issue GN
calls until IMS TM returns a QD status code, indicating that all of the segments for that message have
been retrieved.
If you inadvertently issues a GU
call after retrieving the first segment of the
multi-segment messages, IMS TM returns a QC status code. This
status indicates that no more messages are present, without your program retrieving the additional
segments associated with the message. Data would have been lost without any indication that it
happened.