Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


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:
0, 1, 2, 3, 8, 9, A, and B
Negative:
4, 5, 6, 7, C, D, E, and F

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, and F
Negative:
B and D

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 Windows and host COBOL. Host COBOL generates F internally as the sign of unsigned internal decimal numbers.

related references
ZWB
Data representation


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)