IMS message structure
Each message that is sent to and from IMS can consist of one or more segments. IMS messages often contain multiple segments.
The bit stream that flows between IBM® App Connect Enterprise and the IMS program (also known as the transmission) can contain multiple segments. Each segment begins with the LLZZ and Transaction code fields that are described in IMS nodes. The transmission can contain multiple messages, each one containing multiple segments. The IMS program gets the segments one at a time and typically inserts the output data onto the queue one segment at a time. The IMS program purges the end of a message before it sends the first segment of the next message.

- Model the entire message in MRM.
- Model each segment in MRM but configure the message flow to reflect the application logic in determining the order of these segments.
- An MRM-CWF structure, such as a message definition that is derived from a COBOL copybook
- An MRM-TDS structure when the output is 3270-based, such as a list of name=value strings
- Another structure, such as XML output from a Java™ program that is running in an IMS Java Processing Region (JPR)
IMS presents program output as one or more messages (typically, one output message per input message), each of which comprises one or more segments. The IMSRequest node presents the message as a single BLOB. You can parse the message into segments and use Filter or Compute nodes to test the shape of the response to determine how to re-parse the segments with ResetContentDescriptor nodes.
You must set the LL and ZZ values on output. The LL value is the entire length of the segment, including the four-byte LLZZ prefix. Therefore, the message flow typically requires an ESQL expression to calculate the LL value. The LLZZ field must use a big-endian encoding 785.