z/OS UNIX System Services User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Changing the locale setting in your profile

z/OS UNIX System Services User's Guide
SA23-2279-00

To change the locale, you set the value for the LC_ALL variable. This variable overrides any values for locale specified for the LC_ variables such as LC_COLLATE, LC_MESSAGES, and LC_SYNTAX, but it does not override LC_CTYPE.

If you change LC_ALL to a new locale, and z/OS UNIX messages are provided in that language, change the LANG variable setting to match the LC_ALL setting. Currently, z/OS UNIX messages are shipped in English, Kanji, and Simplified Chinese. If you do not change LANG, the messages will be in English.

If z/OS UNIX messages are not provided in your language, changing LANG by itself has no effect. However, although messages are not supplied in your language, the z/OS UNIX messages that are displayed in English will use your national language characters and should display correctly on your terminals.

When you change the locale, the shell and utilities run in the new locale, but the shell locale category LC_CTYPE stays in the POSIX locale. This can affect parsing and shell expansion, and cause unpredictable behavior. In order to avoid this problem, after you change locale you must overwrite the current shell by issuing the exec tcsh -l command. The new shell will correctly interpret the proper character set for the new locale.

If you place a setenv LC_ALL localename statement in your login profile, or if one has been placed in /etc/csh.login, make sure it is followed with exec tcsh -l and protect that with tty -s, as shown in Examples: Changing locale. If you don't protect it with the tty -s test, BPXBATCH SH command will not run the command.

If you use exec tcsh -l, there are two situations that you must take into account:

  1. Loop control; you only want the exec tcsh -l to be executed the first time.
  2. If you plan to use BPXBATCH or OSHELL (which calls BPXBATCH) with national language support, you need to define the LANG and LC_ALL variables in a file for BPXBATCH to use. See Passing environment variables to BPXBATCH for more information.

If your /etc/csh.login was set up for the proper locale, you only need to change your .login if you want a different locale than already set up as the default. For more information on setting up locale and messages, see the section on customizing for your national code page in the shell in z/OS UNIX System Services Planning.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014