Users can also define their own locales.
The CRTE library $.SYSLNK.CRTE
provides two source program elements (type S) with the names USLOCC
and USLOCA
for this purpose. USLOCC
is a C source program; USLOCA
is an Assembler source program. The two source programs are equally effective at generating user-specific locales.
The source programs define the data for the individual locale categories and are preset with the data of the C locale (see section “POSIX or C locale” ). This data can be changed to the desired values.
The following changes must also be made in the source programs:
An address table with the name
USERLOC
is defined in the source programs. This name must be changed to one selected by the user. The name must be a valid entry name.This can be done in the C source program by simply changing the name
USERLOC
with a#define
statement. In the Assembler source program, the nameUSERLOC
must be modified in the definition line of the table and in theENTRY
statement.The name modified by the user can then be used in a call to
setlocale()
as the locale argument to identify the user-specific locale.
The modified source programs can be compiled or assembled with the C/C++ compiler or with the Assembler (also ASSGEN
). If the module is stored in a PLAM library other than $.SYSLNK.CRTE
, this library must be assigned with the following ADD-FILE-LINK
command before the C program is started:
/ADD-FILE-LINK LINK-NAME=IC@LOCAL,FILE-NAME=
library