Operand conversion rules—Data extract expressions
The following table defines the limits on operand length and the conversions performed for non-packed decimal operands used in an arithmetic expression.
Type of data | Maximum length | Conversion process |
|---|---|---|
Character | 16 digits preceded by an optional plus or minus sign and any number of blanks | The numeric character string is converted to a packed decimal number. The sign is set to X'D' if the number was preceded by a minus sign (-) or to X'C' if the number was preceded by a plus sign (+). |
Hexadecimal | 4 bytes | The hexadecimal value is treated as an unsigned binary number and converted to a positive packed decimal number with a maximum value of 4,294,967,295. |
Zoned | 16 bytes | The zoned decimal number is converted to a packed decimal number with the sign taken from the zone of the right-most zoned decimal byte. |
Fixed | 4 bytes | The fixed binary value is treated as a signed binary number and converted to a signed packed decimal number in the range of -2,147,483,648 to 2,147,483,647. |
Unsigned Decimal | 16 bytes (31 decimal digits) | The unsigned decimal number is converted to a packed decimal number with a plus sign (X'C'). |