Handling of Zoned Decimal Items

The Connector presents certain COBOL items as zoned decimal numbers in the binary data. Such items are of USAGE DISPLAY, a numeric picture clause, and no SIGN SEPARATE clause.

The zoned decimal format represents all decimal digits in text — except for the last byte or possibly the first byte, depending on whether LEADING or TRAILING is in the SIGN clause. That byte contains both the decimal digit and the sign for the whole value. The sign is specified in the first nibble (half byte) and the decimal digit in the second nibble.

The zoned decimal format is one of three variations: EBCDIC, Strict ASCII, and Modified ASCII. The Connector expects a particular format, which depends on the Character Set setting or forceCharacterSet input field for the Render Copybook Data or Parse Copybook Data activity. For details on the related configurations, see the following sections.

EBCDIC Character Sets (Such As IBM037)

The Parse activity expects EBCDIC-zoned decimal format and fails if it encounters any of the ASCII format data. The EBCDIC-zoned decimal format uses EBCDIC codepoints for digits and defines the following sign nibbles for the sign byte:

The Parse accepts positive and negative nibbles for signed items (with S in the PICTURE clause for COBOL) and xF for both signed and unsigned items. Note that signed nibbles are not valid in an unsigned item.

The Render activity generates the signed nibbles : xC for positive and xD for negative signed data. For unsigned data, the activity generates xF.

The ASCII Zoned Format drop-down list and the input field asciiZonedFormat settings are disregarded.

ASCII Character Sets

The Parse activity accepts both Strict ASCII and Modified ASCII. Both formats use ASCII codepoints for decimal digits but represent the sign byte differently. In Strict ASCII, a nibble value of x3 denotes a positive value; x7, a negative one.

Strict ASCII and Modified ASCII represent positive signed and unsigned values in the same way.

Modified ASCII does not have predefined nibbles. See the table on Modified ASCII Sign Bytes.

Render activity can generate both strict and modified ASCII formats. You can specify the desired format in two ways:

  • Use ASCII Zoned Format dropdown list in Settings for Render activity to specify a format.
  • Pass strict or modified to the input field asciiZonedFormat. This field takes precedence over the ASCII Zoned Format dropdown list.
Sign Sign of the Entire Value Decimal Digit in Sign Byte
0x7B Positive 0
0x41 Positive 1
0x42 Positive 2
0x43 Positive 3
0x44 Positive 4
0x45 Positive 5
0x46 Positive 6
0x47 Positive 7
0x48 Positive 8
0x49 Positive 9
0x7D Negative 0
0x4A Negative 1
0x4B Negative 2
0x4C Negative 3
0x4D Negative 4
0x4E Negative 5
0x4F Negative 6
0x50 Negative 7
0x51 Negative 8
0x52 Negative 9