localedef utility

A locale is a collection of data that defines language and cultural conventions.Locales consist of various categories, that are identified by name, that characterize specific aspects of your cultural environment.

The localedef utility generates locales according to the rules that are defined in the locale definition file. You can create your own customized locale definition file.

The localedef utility creates locale objects, which are used by the setlocale() service of the runtime library. This service can be called from both non-XPLINK and XPLINK applications. The non-XPLINK, XPLINK, and 64-bit locale object versions have different names. Also, localedef can generate the locale objects into a PDS or PDSE under BATCH or TSO, or into the z/OS® UNIX System Services file system under the z/OS shell. The non-XPLINK, XPLINK, and 64-bit versions of the locale object should always be generated.

The utility reads the locale definition file and produces a locale object that the locale-specific library functions can use. You invoke localedef using either a JCL procedure or a TSO CLIST, or by specifying the localedef command under z/OS UNIX System Services. To activate a locale during your application’s execution, you call the runtime function setlocale().

Note: TSO and z/OS batch are not supported for building 64-bit locales. You must use the localedef command under z/OS UNIX System Services to build 64-bit locales.

The options for the localedef utility in TSO or z/OS batch are as follows. Spaces or commas can separate the options. If you specify the same option more than once, localedef uses the last option that you specified.

CHARMAP(name)
Specifies the member name of the file that contains the definition of the encoded character set. If you do not specify this option, the localedef utility assumes the encoded character set IBM-1047.

The name that is specified for the CHARMAP is the member name within a partitioned data set, with the - (dash) sign converted to an @ (at) sign.

FLAG(W|E)
The FLAG option controls whether localedef issues warning messages. If you specify FLAG(W), localedef issues warning and error messages. If you specify FLAG(E), localedef issues only the error messages.
BLDERR|NOBLDERR
If you specify the BLDERR option, localedef generates the locale even if it detects errors. If you specify the NOBLDERR option, localedef does not generate the locale if it detects an error.

The following topics describe how you can invoke the localedef utility. For more information on locale source definition files, codeset mapping files (CHARMAPs), method files, and locale object names, refer to z/OS XL C/C++ Programming Guide. For information on using the localedef utility under z/OS UNIX System Services, refer to z/OS UNIX System Services Command Reference.