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


Examples: Changing locale

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

If you are using OMVS, the 3270 terminal interface. If your /etc/profile is not set up for your locale and LANG, then in order to work in a locale such as Danish, then add this code to the .profile file:
if test -z "$LOCALE_SWITCH" && tty -s
then
  echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - "
  echo " - Logon shell will now be invoked to reflect        - "
  echo " - code page IBM-277                                 - "
  echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - "
  LOCALE_SWITCH=EXECUTED
  LANG=C
  LC_ALL=Da_DK.IBM-277
  export LANG LC_ALL LOCALE_SWITCH
  #Issue chcp if not using OMVS command
   if test "$_BPX_TERMPATH" ! "OMVS"
   then
   chcp -a ISO8859-1 -e IBM-277  
   fi
exec sh -L
else
  echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - "
  echo " -  Welcome to OS/390 UNIX System Services           - "
  echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - "
fi 
 

If you want your messages displayed in a different language than that specified in the system-wide /etc/profile, you must modify your .profile accordingly. For more information, see Customizing the language of your messages.

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.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014