Rational Developer for System z
COBOL for Windows, Version 7.5, Language Reference


Appendix G. Locale considerations

A locale is a collection of language-specific and culture-specific conventions for information processing. A locale makes information about language and culture available at run time so that the same program or method can display or process data differently for different countries or cultures.

See the COBOL for Windows Programming Guide for additional information about locales and the details of setting locales for specific languages and cultures.

Compile-time versus runtime locale

In general, the COBOL run time determines the locale in effect when the COBOL application is activated. However, the following processing is based on the locale in effect at compile time:

The following sections describe the effects of locales on COBOL runtime processing.

Code pages

The runtime locale is used to determine:

Two runtime code pages can be in effect: one for native data (non-EBCDIC data) and one for host data (EBCDIC data). The COBOL for Windows Programming Guide explains how these runtime code pages are determined.

Collating sequences

In general, COBOL for Windows uses the collating sequence defined by the runtime locale when the COLLSEQ(LOCALE) compiler option or the NCOLLSEQ(LOCALE) compiler option is in effect. COLLSEQ(LOCALE) affects alphanumeric and DBCS data items; NCOLLSEQ(LOCALE) affects items described with USAGE NATIONAL.

When COLLSEQ(BINARY) or NCOLLSEQ(BINARY) is specified, a binary collating sequence is used.

In some cases, the language rules specify the use of a non-locale collating sequence regardless of the setting of the COLLSEQ or NCOLLSEQ compiler option. For example:

Supported locales

COBOL for Windows supports locales for certain combinations of language, country, and code page. System environment variables identify the runtime locale in effect for specific locale categories. See the COBOL for Windows Programming Guide for details.


Terms of use | Feedback

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