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:

An application program can send three kinds of messages:

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.

Figure 1. Message segments
begin figure description - This figure is described in the surrounding text. end figure description

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.