DISPLAY_TO_Z function
Functions
DISPLAY_TO_Z{[DISPLAY],[SIGN],[POSITION],[DECIMAL]}
This function converts a signed numeric value (in COBOL DISPLAY format) to a numeric character string.
If the size of the input data is 0, the value 0 is returned.
Parameters
DISPLAY
Specify the character encoding of the character set.
- A
-
: Treats the character set as ASCII.
- E
-
: Treats the character set as EBCDIC.
If you omit this parameter, ASCII is applied.
SIGN
Specify the character encoding of the sign position.
- A
-
: Treats the sign position as ASCII.
- E
-
: Treats the sign position as EBCDIC.
If you omit this parameter, EBCDIC is applied.
POSITION
This parameter enables the rightmost or leftmost numeric value to be treated as a signed numeric value and replaces it with encoding that matches a value in Table App. 1.2.
- L
-
: Treats the leftmost numeric value as a signed numeric value.
- T
-
: Treats the rightmost numeric value as a signed numeric value.
If you omit this parameter, T is applied.
DECIMAL
Specify the digits after the decimal point for the input. Use a number from 0 to 9.
0 indicates no decimal places. If you omit this parameter, 0 is applied.
Original leftmost/ |
Character representing signed value |
|||||
---|---|---|---|---|---|---|
Positive value |
Negative value |
|||||
Character set (ASCII) |
Character set (EBCDIC) |
Character set (ASCII) |
Character set (EBCDIC) |
|||
Sign (ASCII) |
Sign (EBCDIC) |
Sign (EBCDIC) |
Sign (ASCII) |
Sign (EBCDIC) |
Sign (EBCDIC) |
|
0 |
0 (30) |
{ (7B) |
{ (C0) |
p (70) |
} (7D) |
} (D0) |
1 |
1 (31) |
A (41) |
A (C1) |
q (71) |
J (4A) |
J (D1) |
2 |
2 (32) |
B (42) |
B (C2) |
r (72) |
K (4B) |
K (D2) |
3 |
3 (33) |
C (43) |
C (C3) |
s (73) |
L (4C) |
L (D3) |
4 |
4 (34) |
D (44) |
D (C4) |
t (74) |
M (4D) |
M (D4) |
5 |
5 (35) |
E (45) |
E (C5) |
u (75) |
N (4E) |
N (D5) |
6 |
6 (36) |
F (46) |
F (C6) |
v (76) |
O (4F) |
O (D6) |
7 |
7 (37) |
G (47) |
G (C7) |
w (77) |
P (50) |
P (D7) |
8 |
8 (38) |
H (48) |
H (C8) |
x (78) |
Q (51) |
Q (D8) |
9 |
9 (39) |
I (49) |
I (C9) |
y (79) |
R (52) |
R (D9) |
Example
1. Character set: ASCII; Sign position: EBCDIC; Signed numeric value: rightmost; No decimal places

Figure A.6 Example of using the DISPLAY_TO_Z function (1)
2. Character set: ASCII; Sign position: EBCDIC; Signed numeric value: rightmost; 2 digits after decimal point

Figure A.7 Example of using the DISPLAY_TO_Z function (2)