Examples: Changing locale

For example, say that you are using OMVS, the 3270 terminal interface. If your /etc/csh.login is not set up for your locale and LANG, then in order to work in a locale such as Danish, you should add this to your .login file:
tty -s
set tty_rc=$status
if (($?LOCALE_SWITCH == 0 ) && ($tty_rc == 0)) then
        echo "------------------------------------------------"
        echo "- Logon shell will now be invoked to reflect   -"
        echo "- code page IBM-277                            -"
        echo "------------------------------------------------"
        setenv LOCALE_SWITCH EXECUTED
        setenv LANG C
        setenv LC_ALL Da_DK.IBM-277
        # Issue chcp if not using OMVS command
        if ($?_BPX_TERMPATH != "OMVS"  ) then
          chcp -a ISO8859-1 -e IBM-277
        endif
        exec tcsh -l
endif
unset tty_rc

If you want your messages displayed in a different language than that specified in the system-wide /etc/csh.login, you have to modify your .login accordingly.

For a list of the z/OS UNIX locales (and their locale object names) and locale source files, see Locale objects, source files, and charmaps.