The picture characters CR, DB, T, I, and R cannot be used with any other sign characters in the same field.
The character pairs CR (credit) and DB (debit) specify the signs of real numeric character data items.
Any of the picture characters T, I, or R (known as overpunch characters) specifies that a character represents the corresponding digit and the sign of the data item. A floating-point specification can contain two--one in the mantissa field and one in the exponent field. The overpunch character can be specified for any digit position within a field.
The T, I, and R picture characters specify how the input characters are interpreted, as shown in Table 40.
|
T or I |
T or R |
Digit |
|
Digit with + |
Digit with - |
|
|
Character |
Character |
|
|
{ A B C D E F G H I |
} J K L M N O P Q R |
0 1 2 3 4 5 6 7 8 9 |
T, I, and R specify the following values:
On output, T specifies that the associated position contains one of the characters { through | if the input data represents positive values, and one of the characters } through R if the input data represents negative values. The T can appear anywhere a '9' picture specification character occurs. For example:
dcl Credit picture 'ZZV9T';
The character representation is 4 characters; +21.05 is held as '210E', -0.07 is held as 'bb0P'.
On output, I specifies that the associated position contains one of the characters { through | if the input data represents positive values; otherwise, it contains one of the digits, 0 through 9.
On output, R specifies that the associated position contains one of the characters } through R if the input data represents negative values; otherwise, it contains one of the digits 0 through 9. For example:
dcl X fixed decimal(3); get edit (x) (P'R99');
sets X to 132 on finding '132' in the next three positions of the input stream, but sets X to -132 on finding 'J32'.
Table 41 shows examples of credit, debit, overpunched, and zero replacement characters.
|
Source Attributes |
Source Data (in constant form) |
Picture Specification |
Character Value |
|---|---|---|---|
|
FIXED(3) FIXED(4,2) FIXED(4,2) |
-123 12.34 -12.34 |
$Z.99CR $ZZV.99CR $ZZV.99DB |
$1.23CR $12.34bb $12.34DB |
|
FIXED(4,2) FIXED(4) FIXED(4) |
12.34 1021 -1021 |
$ZZV.99DB 999I Z99R |
$12.34bb 102A 102J |
|
FIXED(4) FIXED(5) FIXED(5) |
1021 00100 10203 |
99T9 YYYYY 9Y9Y9 |
10B1 bb1bb 1b2b3 |
|
FIXED(5,2) |
000.04 |
YYYVY9 |
bbbb4 |