HP COBOL II/XL Quick Reference Guide (31500-90015)
5-: 6
The table below shows the units digit, with the sign of its associated
number represented in ASCII code.
Table 5-3. Overpunch Characters for Rightmost Digit in ASCII Coded Decimal
Numbers
---------------------------------------------------------
- Units Digit - Internal Representation (ASCII) -
---------------------------------------------------------
- - Positive - Negative - No Sign -
---------------------------------------------------------
- 0 - { - } - 0 -
---------------------------------------------------------
- 1 - A - J - 1 -
---------------------------------------------------------
- 2 - B - K - 2 -
---------------------------------------------------------
- 3 - C - L - 3 -
---------------------------------------------------------
- 4 - D - M - 4 -
---------------------------------------------------------
- 5 - E - N - 5 -
---------------------------------------------------------
- 6 - F - O - 6 -
---------------------------------------------------------
- 7 - G - P - 7 -
---------------------------------------------------------
- 8 - H - Q - 8 -
---------------------------------------------------------
- 9 - I - R - 9 -
---------------------------------------------------------
The table below shows the number of bytes used depending on the size of a
data item.
Table 5-4. Number of Bytes Used to Contain a BINARY Data Item
---------------------------------------------------------------------------------------------
- PICTURE - Number of Bytes -
---------------------------------------------------------------------------------------------
- S9 to S9(4) - 2 -
- S9(5) to S9(9) - 4 -
- S9(10) to S9(18) - 8 -
---------------------------------------------------------------------------------------------
The table below shows the bit configuations used to represent signs in
packed-decimal fields.
Table 5-5. COMPUTATIONAL-3 or PACKED-DECIMAL Sign Configuration
----------------------------------------------------------------------------------------------
| | Bit | Hexadecimal |
| Sign | Configuration | Value |
----------------------------------------------------------------------------------------------
- + - 1100 - C -
----------------------------------------------------------------------------------------------
- - - 1101 - D -
----------------------------------------------------------------------------------------------
- Unsigned - 1111 - F -
----------------------------------------------------------------------------------------------