Sign representation of zoned and packed-decimal data
Sign representation affects the processing and interaction of zoned decimal and internal decimal data.
Given X'
sd'
,
where s is the sign representation and d represents
the digit, the valid sign representations for zoned decimal
(USAGE DISPLAY
) data without the SIGN IS
SEPARATE
clause are:
- Positive:
3
,C
, andF
- Negative:
7
andD
When the CHAR(NATIVE)
compiler
option is in effect, signs generated internally are 3 for positive
and unsigned, and 7 for negative.
When the CHAR(EBCDIC)
compiler
option is in effect, signs generated internally are C for positive,
F for unsigned, and D for negative.
Given X'
ds'
,
where d represents the digit and s is
the sign representation, the valid sign representations for internal
decimal (USAGE PACKED-DECIMAL
) data are:
- Positive:
A
,C
,E
, andF
- Negative:
B
andD
Signs generated internally are C for positive and unsigned, and D for negative.
The sign representation of unsigned internal decimal numbers is different between COBOL for Linux® and Enterprise COBOL for z/OS®. Enterprise COBOL for z/OS generates F internally as the sign of unsigned internal decimal numbers.