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


Specifying the code page with a locale

In a source program, you can use the characters that are represented in a supported code page in COBOL names, literals, and comments. (See the COBOL for Windows Language Reference information cited in the related references below for full details about the formation of user-defined words.)

At run time, you can use the characters that are represented in a supported code page in data items described with USAGE DISPLAY, USAGE DISPLAY-1, or USAGE NATIONAL.

The code page that is in effect for a particular data item depends on the following aspects:

COBOL for Windows chooses between ASCII and EBCDIC code pages as follows:

COBOL determines the appropriate code page as follows:

ASCII
From the active locale at run time.
EBCDIC
From the EBCDIC_CODEPAGE environment variable, if it is set. Otherwise, COBOL uses the default EBCDIC code page from the current locale setting.

The code page for USAGE NATIONAL data items and national literals is UTF-16, CCSID 1202.

related tasks
Using environment variables to specify a locale

related references
Locales and code pages that are supported
Runtime environment variables
CHAR
COBOL words with single-byte characters (COBOL for Windows Language Reference)
User-defined words with multibyte characters (COBOL for Windows Language Reference)


Terms of use | Feedback

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