You can use environment variables to specify necessary system information.
Different commands are used to set the environment variables depending on whether you are using the z/OS® UNIX System Services shell (sh), which is based on the Korn Shell and is upward-compatible with the Bourne shell, or tcsh shell, which is upward-compatible with the C shell. To determine the current shell, use the echo command, which is echo $SHELL.
The z/OS UNIX System Services shell path is /bin/sh. The tcsh shell path is /bin/tcsh.
For more information about the NLSPATH and LANG environment variables, see z/OS XL C/C++ Programming Guide and z/OS UNIX System Services Command Reference.
The following statements show how you can set environment variables in the z/OS shell:
LANG=En_US
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
PATH=/bin:/usr/lpp/cbclib/xlc/bin${PATH:+:${PATH}}
export LANG NLSPATH PATH
To set the variables so that all users have access to them, add the commands to the file /etc/profile. To set them for a specific user only, add the commands to the .profile file in the user's home directory. The environment variables are set each time the user logs in.
The following statements show how you can set environment variables in the tcsh shell:
setenv LANG En_US
setenv NLSPATH /usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
setenv PATH /bin:/usr/lpp/cbclib/xlc/bin${PATH:+:${PATH}}
To set the variables so that all users have access to them, add the commands to the file /etc/csh.cshrc. To set them for a specific user only, add the commands to the .tcshrc file in the user's home directory. The environment variables are set each time the user logs in.
Before using the compiler, you must install the message catalogs and set the environment variables:
The LANG environment variable can be set to any of the locales provided on the system. See the description of locales in z/OS XL C/C++ Programming Guide for more information.
The national language code for United States English may be En_US or C. If the Japanese message catalog has been installed on your system, you can substitute Ja_JP for En_US.
The LANG and NLSPATH environment variables are initialized when the operating system is installed, and may differ from the ones you want to use.