Output message format and contents

The format of the output message that you build to send back to a terminal or to another program is similar to the format of the input message, but the fields contain different information.

Output messages contain four fields: the length field, the Z1 field, the Z2 field, and the text field. The following tables show the message output layouts. The output message field names are in the first row of each table. The number below each field name is the length in bytes that has been defined for that field. The following table shows the format of an output message for AIBTDLI, ASMTDLI, CBLTDLI, CEETDLI, CTDLI, and PASTDLI interfaces. The format for PLITDLI is slightly different.

Table 1. Output message format
Field Name Field Length
LL 2
Z1 1
Z2 1
Text Variable
Table 2. Output message format for PLITDLI
Field Name Field Length
LLLL 4
Z1 1
Z2 1
Text Variable
The contents of the output message fields are:
LL or LLLL
The field length contains the length of the message in binary, including the LL (or LLLL), Z1, and Z2 fields. For output message segments, supply this length when you are ready to send the message segment.

For the AIBTDLI, ASMTDLI, CBLTDLI, CEETDLI, CTDLI, and PASTDLI interfaces, the LL field must be 2 bytes long. For the PLITDLI interface, the LLLL field must be 4 bytes long and contain the length of the message segment, minus 2 bytes.

Z1
The Z1 field is a 1-byte field that must contain binary zeros. It is reserved for IMS TM.
Z2
The Z2 field is a 1-byte field that can contain special device-dependent instructions (such as instructions to ring the alarm bell, instructions to disconnect a switched line, or paging instructions) or device-dependent information (such as information about structured field data or bypassing MFS).

If you do not use any of these instructions, the Z2 field must contain binary zeros. For MFS, this field contains the number of the option that is being used for this message.

Text
The text portion of the message segment contains the data that you want to send to the logical terminal or to an application program. (Text messages are typically EBCDIC characters.) The length of the text depends on the data that you want to send.