Use any of several environment variables to provide the locale information for a COBOL program.
To specify a code page to use for all of the locale categories (messages, collating sequence, date and time formats, character classification, and case conversion), use LC_ALL.
To set the value for a specific locale category, use the appropriate environment variable:
Any locale category that has not been specified by one of the locale environment variables above is set from the value of the LANG environment variable.
To set the locale environment variables, use a command of the following format (.codepageID is optional):
export LC_xxxx=ll_CC.codepageID
Here LC_xxxx is the name of the locale category, ll is a lowercase two-letter language code, CC is an uppercase two-letter ISO country code, and codepageID is the code page to be used for native DISPLAY and DISPLAY-1 data. COBOL for AIX uses the POSIX-defined locale conventions.
For example, to set the locale to Canadian French encoded in ISO8859-1, issue this command in the command window from which you compile and run a COBOL application:
export LC_ALL=fr_CA.ISO8859-1
You must code a valid value for the locale name (ll_CC), and the code page (codepageID) that you specify must be valid for the locale name. Valid values are shown in the table of supported locales and code pages referenced below.
related concepts
Determination of the locale from system settings
related tasks
Specifying the code page for character data