This topic describes how you can create your own locales, based on the locale definition files supplied by IBM. See Locales supplied with z/OS XL C/C++ for more information on the compiled locales and locale source files. The information in this topic applies to the format of locales based on the localedef utility.
The following example assumes that the target of the generated locale will be a data set, but locales may also reside in a z/OS UNIX file system (see Locale naming conventions for differences in object names). In this example you will build a locale named TEXAN using the charmap file representing the IBM-1047 encoded character set. The locale is derived from the locale representing the English language and the cultural conventions of the United States. We will assume that non-XPLINK, XPLINK, and AMODE 64 applications will use the TEXAN locale. All three versions of the TEXAN locale will be generated.
d_t_fmt "%a %b %e %H:%M:%S %Z %Y
to
d_t_fmt "Howdy Pardner %a %b %e %H:%M:%S %Z %Y"
EDCLOCNM TYPE=ENTRY,LOCALE='TEXAN',CODESET='IBM-1047',CODE='1T'
//HLASM EXEC PGM=ASMA90
//SYSPRINT DD SYSOUT=*
//SYSLIB DD DSN=SYS1.MACLIB,DISP=SHR
// DD DSN=CEE.SCEEMAC,DISP=SHR
//SYSUT1 DD UNIT=VIO,DISP=(NEW,DELETE),SPACE=(32000,(30,30))
//SYSUT2 DD UNIT=VIO,DISP=(NEW,DELETE),SPACE=(32000,(30,30))
//SYSUT3 DD UNIT=VIO,DISP=(NEW,DELETE),SPACE=(32000,(30,30))
//SYSPUNCH DD DUMMY
//SYSLIN DD DSN=<hlq>.LOCALE.OBJECT(EDC$LCNM),DISP=SHR
//SYSIN DD DSN=<hlq>.LOCALE.TABLE(EDC$LCNM),DISP=SHR
//*
//LKED EXEC EDCL,
// OUTFILE='<hlq>.LOCALE.LOADLIB(EDC$LCNM),DISP=SHR'
//LKED.SYSLIN DD DSN=<hlq>.LOCALE.OBJECT(EDC$LCNM),DISP=SHR
For this non-XPLINK locale the prefix is EDC$, the LT code for TEXAN is 1T and the CC code for IBM-1047 is EY. The non-XPLINK object name is therefore EDC$1TEY.
For this XPLINK locale the prefix is CEH$. The LTand CC codes remain the same. The XPLINK object name is therefore CEH$1TEY.
For this 64–bit locale the prefix is CEQ$. The LT and CC codes remain the same. The 64–bit locale object name is, therefore, CEQ$1TEY.
//GENLOCNX EXEC PROC=EDCLDEF,
// INFILE='hlq.LOCALE.SOURCE(TEXAN)',
//
OUTFILE='hlq.LOCALE.LOADLIB(EDC$1TEY),DISP=SHR',
// LOPT='CHARMAP(IBM-1047)'
//GENLOCX EXEC PROC=EDCXLDEF,
// INFILE='hlq.LOCALE.SOURCE(TEXAN)',
//
OUTFILE='hlq.LOCALE.PDSE.LOADLIB(CEH$1TEY),DISP=SHR',
// LOPT='CHARMAP(IBM-1047)'
The batch and TSO versions of the localedef utility cannot be used to generate 64–bit locales. The UNIX Systems Services utility must be used. To do this from TSO or batch the BPXBATCH utility can be used. See z/OS UNIX System Services Command Reference for more information about BPXBATCH. Here, we will assume we are in a UNIX System Services shell session:
cp "//'hlq.LOCALE.SOURCE(TEXAN)'" texan.localedef
localedef -6 -i texan.localedef -f /usr/lib/nls/charmap/IBM-1047
TEXAN.IBM-1047.lp64
cp TEXAN.IBM-1047.lp64 "//'hlq.LOCALE.PDSE.LOADLIB(CEQ$1TEY)'"
See z/OS XL C/C++ User's Guide for detailed information about the batch and TSO versions of localedef utility. The UNIX System Services version of the localedef utility is also described in z/OS UNIX System Services Command Reference.