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


CHAR

CHAR affects the representation and runtime treatment of USAGE DISPLAY and USAGE DISPLAY-1 data items.

CHAR option syntax
Read syntax diagramSkip visual syntax diagram         .-NATIVE-.    
>>-CHAR(-+-EBCDIC-+-)------------------------------------------><
         '-S390---'    
 

Default is: CHAR(NATIVE)

Abbreviations are: None

Specify CHAR(NATIVE) to use the native character representation (the native format) of the platform. For COBOL for Windows, the native format is defined by the code page that is indicated by the locale in effect at run time. The code page can be a single-byte ASCII code page or an ASCII DBCS code page.

CHAR(EBCDIC) and CHAR(S390) are synonymous and indicate that DISPLAY and DISPLAY-1 data items are in the character representation of zSeries, that is, in EBCDIC.

However, DISPLAY and DISPLAY-1 data items defined with the NATIVE phrase in the USAGE clause are not affected by the CHAR(EBCDIC) option. They are always stored in the native format of the platform.

The CHAR(EBCDIC) compiler option has the following effects on runtime processing:

Hexadecimal literals are assumed to represent EBCDIC characters if the literals are assigned to, or compared with, character data. For example, X'C1' compares equal to an alphanumeric item that has the value 'A'.

Figurative constants HIGH-VALUE or HIGH-VALUES, LOW-VALUE or LOW-VALUES, SPACE or SPACES, ZERO or ZEROS, and QUOTE or QUOTES are treated logically as their EBCDIC character representations for assignments to or comparisons with data items that are encoded in EBCDIC.

In comparisons between nonnumeric DISPLAY items, the collating sequence used is the ordinal sequence of the characters based on their binary (hexadecimal) values as modified by an alternate collating sequence for single-byte characters, if specified.

related tasks
Specifying the code page with a locale

related references
Appendix B. zSeries host data format considerations
COLLSEQ


Terms of use | Feedback

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