COBOL for AIX uses the following environment variables that are common to both the compiler and the run time.
This variable must be set to run programs that require dynamic loading. For example:
export COBPATH=/pgmpath/pgmshlib
For example, the following command sets the language locale name to U.S. English:
export LANG=en_US
LOCPATH is used for any operations that reference the locale, including locale-based comparisons of alphanumeric data items.
COBOL for AIX installation puts the messages in usr/lib/nls/msg/xx, where xx is any language that COBOL for AIX supports. The default is en_US.
When you set NLSPATH, be sure to add to NLSPATH rather than replace it. Other programs might use this environment variable. For example:
DIR=xxxx nlspath=$DIR/%L/%N:$NLSPATH export NLSPATH
xxxx is the directory where COBOL was installed. The directory xxxx must contain a directory xxxx/en_US (in the case of a U.S. English language setup) that contains the COBOL message catalog.
Messages in the following languages are included with the product:
You can specify the languages for the messages and for the locale setting differently. For example, you can set the environment variable LANG to en_US and set the environment variable LC_ALL to ja_JP.IBM-eucJP. In this example, any COBOL compiler or runtime messages will be in English, whereas native ASCII (DISPLAY or DISPLAY-1) data in the program is treated as encoded in code page IBM-eucJP (ASCII Japanese code page).
The compiler uses the combination of the NLSPATH and the LANG environment variable values to access the message catalog. If NLSPATH is validly set but LANG is not set to one of the locale values shown above, a warning message is generated and the compiler defaults to the en_US message catalog. If the NLSPATH value is invalid, a terminating error message is generated.
The runtime also library also uses NLSPATH to access the message catalog. If NLSPATH is not set correctly, runtime messages appear in an abbreviated form.
For example:
export TMP=/tmp
export TZ=SSS[+|-]nDDD[,sm,sw,sd,st,em,ew,ed,et,shift]
If TZ is not present, the default is EST5EDT, the default locale value. If only the standard time zone is specified, the default value of n (difference in hours from GMT) is 0 instead of 5.
If you supply values for any of sm, sw, sd, st, em, ew, ed, et, or shift, you must supply values for all of them. If any of these values is not valid, the entire statement is considered invalid and the time-zone information is not changed.
For example, the following statement sets the standard time zone to CST, sets the daylight saving time to CDT, and sets a difference of six hours between CST and UTC. It does not set any values for the start and end of daylight saving time.
export TZ=CST6CDT
Other possible values are PST8PDT for Pacific United States and MST7MDT for Mountain United States.
related tasks
Using environment variables to specify a locale
related references
Locales and code pages that are supported
TZ environment parameter variables