Chapter 14. Building roll your own clients 277
If the transaction code is sent as Unicode, the transaction code will be translated to EBCDIC.
The host application must define an 8-byte field to contain the transaction code. If the
installation wants to have a blank following the 8-byte transaction code field, it will be
delivered to the host application as a Unicode blank, not an EBCDIC blank.
14.3.2 Output message including Unicode data from IMS Connect
The data section of output message is not transformed for those outputs that are a result of
Unicode data received from the client. If Unicode data is sent to IMS Connect, the related
output is treated as Unicode. For RESUME TPIPE requests, the client must specify in the
IRM if the output is to be treated as Unicode or non-Unicode. For message switching, it is the
IMS host application’s responsibility to ensure that the output message is formatted using the
correct Unicode encoding schema or EBCDIC for the destination. All IMS error messages (for
example, DFS555I) are sent as either ASCII or EBICDIC. The client application uses the
IRM_MSGID field of the IRM to tell IMS which type to send. IMS Connect does not transform
messages to Unicode. For example, if IRM_MSGID is specified as EBCDIC, the IMS error
message (DFSnnnn) is sent as EBCDIC; if IRM_MSGID is specified as ASCII, the IMS error
message (DFSnnnn) is translated from EBCDIC to ASCII by the user exit.
14.3.3 Message structures for Unicode support
Table 14-8 shows new fields and flags in the IRM header have been defined for Unicode
support.
Table 14-8 New fields and flags in IRM header for Unicode support
For Unicode data, the input message structure sent by the client must adhere to the structure
shown in Table 14-9.
Table 14-9 The input message structure for Unicode support
Field Value Meaning
IRM_F1 field (has new flags).
IRM_F1_UC X
'20' Unicode message
IRM_F1_UCTC X
'10' Unicode transaction code
IRM_ES field (This is a new field. Previous name was IRM_RSV02, reserved field.)
IRM_ES_UTF8 X'01' UTF8 encoding shcema
IRM_ES_UCS2 X
'02' UCS2 encoding shcema
IRM_ES_UTF16 X
'02' UTF16 encoding shcema
Message structure contents Consideration
LLLL (full word total length) It must be binary.
IRM header It cannot be Unicode. It must be:
The binary data for defined binary fields.
The data fields defined as character fields
and can be either ASCII or EBCDIC.
OTMA headers If your own user exit provides OTMA header, it
cannot be Unicode. It must be:
The binary data for defined binary fields.
The data fields defined as character fields
and can be either ASCII or EBCDIC.