Under z/OS® UNIX System
Services,
use the localedef command to invoke the localedef
utility. The invocation syntax for the localedef command
is as follows:
localedef [–c]
[–w] [–X]
[–A][–f charmap]
[–i sourcefile]
[–m] [–L binderoptions] name
Options
- –A
- Causes localedef to generate an ASCII locale object. ASCII locales
invoke ASCII methods, so they must be generated using ASCII charmaps.
An ASCII charmap maps symbolic character
names into ASCII code points, but even ASCII charmap specifications
are written in EBCDIC code page IBM-1047. Users must ensure that the charmap specified,
when they invoke the localedef utility, is an ASCII charmap.
Note: When –A is specified, –X is assumed because ASCII
locales are only supported as XPLINK locales.
- –c
- Creates permanent output even if there were warning messages.
Normally, localedef does not create permanent output when it has issued
warning messages.
- –f charmap
- Specifies a charmap file that contains
a mapping of character symbols and collating element symbols to actual
character encodings.
- –i sourcefile
- Specifies the file that contains the source definitions. If there
is no –i, localedef reads the source definitions
from the standard input.
- –m MethodFile
- Specifies the names of a method file that identifies the methods
to be overridden when constructing a locale object. The localedef
utility reads a method file and uses indicated entry points when constructing
a locale object. Method files are used to replace IBM-supplied method
functions with user-written method functions. For each replaced method,
the method file supplies the user-written
method function name and optionally indicates where the method function
code is to be found (.o file, archive library or DLL). Method files
typically replace the charmap related methods.
When this is done, the end result is the creation of a locale, which
supports a blended code page. The user-written method functions are
used both by the locale-sensitive APIs they represent, and also by
localedef itself while generating the method-file based ASCII locale
object. This second use by localedef itself causes a temporary DLL
to be created, while processing the charmap file
supplied on the –f parameter. The name of
the file containing method objects or side deck information is passed
by localedef as a parameter on the c89 command line, so the standard
archive/object/side deck suffix naming conventions apply (in other
words, .a, .o, .x).
Note: Method files may only be used when constructing ASCII locale
objects (that is, when the –A option is also specified). If
the –A option is not specified along with the –m option,
then a severe error message will be issued and processing will be
terminated.
- –w
- Instructs localedef to issue a warning message when a duplicate
character definition is found. This is mainly intended for debugging
character map specifications. It can help to ensure that a code point
value is not accidentally assigned to the wrong symbolic character
name.
- –X
- Causes localedef to generate an XPLINK AMODE
31 locale object (DLL).
- –L binderoptions
- Instructs localedef to pass additional binder options (mostly
for diagnostic purposes).
- -6
- Instructs localedef to generate an XPLINK AMODE
64 locale object (DLL). The -X option is implied when this option
is specified.
- name
- Is the name applied to the target locale object generated
by localedef. Locale naming conventions are described in detail in z/OS XL C/C++ Programming Guide.
If the naming conventions are not followed, applications are required
to supply the full path name on each setlocale() invocation
of locales that reside in the z/OS UNIX file system.
z/OS ships
two versions of the localedef utility:
- One can be invoked under z/OS batch
and TSO, and is shipped in the CEE.SCEERUN2 data set.
- The other can be invoked under z/OS UNIX System
Services, and
is shipped with z/OS UNIX.
The TSO REXX Exec localedef, included
in the z/OS XL C/C++ compiler,
is not supported in the z/OS shell
environment. In that environment, use the z/OS UNIX System
Services localedef command
instead. For more information on the localedef command,
refer to z/OS UNIX System Services Command Reference.