Create Locale (CRTLOCALE)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Create Locale (CRTLOCALE) command creates a locale object (*LOCALE) using the source information from the file provided on the SRCFILE parameter.

A locale is an object that can determine how data is processed, printed, and displayed. Locales are made up of categories that define language, cultural data, and character sets. Locales, in the form of a system object, are not shipped with the operating system. Rather, the locale definition source files are provided.

For more information about locales, see the Globalization information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.

Restriction

Locales must be created in the QSYS file system.

Top

Parameters

Keyword Description Choices Notes
LOCALE Locale name Path name Required, Positional 1
SRCFILE Source file path name Path name Required, Positional 2
CCSID Coded character set ID 1-65533, *JOB, *UTF Required, Positional 3
GENLVL Generation severity level 10, 20 Optional
TEXT Text 'description' Character value, *BLANK Optional
OUTPUT Output *PRINT, *NONE Optional
OPTION Source listing options Element list Optional
Element 1: Source listing Integer, *SRC, *NOSRC
Element 2: Second level messages Integer, *SECLVL, *NOSECLVL
REPLACE Replace object *YES, *NO Optional
DTAAUT Public authority for data Name, *INDIR, *NONE, *RWX, *RX, *RW, *WX, *R, *W, *X, *EXCLUDE Optional
OBJAUT Public authority for object Single values: *INDIR, *NONE, *ALL
Other values (up to 4 repetitions): *OBJEXIST, *OBJMGT, *OBJALTER, *OBJREF
Optional
Top

Locale name (LOCALE)

Specifies the path name of the locale being created.

Top

Source file path name (SRCFILE)

Specifies the path name of the source file that contains the description of the locale being created. If the CCSID of the file is 65535, the job default CCSID is assumed by this command. If the file is from the QSYS file system, then it must be a database source physical file.

Note: If the source file is not a record file, then each line in the source file must have been terminated with a newline or linefeed character when the source file was created.

Top

Coded character set ID (CCSID)

Specifies the coded character set ID (CCSID) in which to store the locale information for the locale object.

The possible values are:

*JOB
Specifies that the job CCSID is used for the locale information. If the job CCSID is 65535, the job default CCSID is used.
*UTF
Specifies that two locales will be created, one for UTF8 and one for UTF32. The UTF8 locale name will have _8 appended to the specified locale name. The UTF32 locale name will have _4 appended to the specified locale name. The locale name specified will be limited to 8 characters in length when CCSID(*UTF) is specified.
coded-character-set-ID
Specify the CCSID used for the locale information.
Top

Generation severity level (GENLVL)

Specifies the severity level at which the creation operation can be controlled. The severity level of the messages generated in the creation operation indicate the type of errors that have occurred.

Note: If errors occur with a severity level greater than 20, the locale is not created.

The possible values are:

10
The locale is created with level 10 severity errors.
20
The locale is created with level 20 severity errors.
Top

Text 'description' (TEXT)

Specifies the text that briefly describes the locale.

The possible values are:

*BLANK
Text is not specified.
'description'
Specify no more than 50 characters of text, enclosed in apostrophes.
Top

Output (OUTPUT)

Specifies whether or not a compiler listing is produced.

The possible values are:

*PRINT
The compiler listing is produced. The information contained in the listing depends on the values specified on the OPTION parameter.
*NONE
The compiler listing is not produced. To improve compile-time performance, this value should be specified when a listing is not required.
Top

Source listing options (OPTION)

Specifies the types of output lists created when this command is processed.

The possible values are:

*SRC
The source input used to create the locale is printed.
*NOSRC
The source input used to create the locale is not printed.
*NOSECLVL
Only the first-level error message text is included in the source listing.
*SECLVL
Second-level error message text is printed.
Top

Replace object (REPLACE)

Specifies whether an existing version of the locale is replaced by the current locale.

The possible values are:

*YES
The existing locale is replaced with the new version. The old version is moved to the library QRPLOBJ and renamed based on the system date and time. The text description of the original locale is not used as the text description for the new locale. The old locale is deleted at the next IPL or you can use the Delete Locale (DLTLOCALE) command to delete it.
*NO
The local is not replaced and an error message is issued.
Top

Public authority for data (DTAAUT)

Specifies the public authority given users for the data in the object created.

The possible values are:

*INDIR
The authority for the object being created is determined by the directory it is being created in. If *INDIR is used for DTAAUT, it is also required for OBJAUT.
*RWX
The users are given *RWX authority to the objects. *RWX authority allows the user to perform all operations on the object except those limited to the owner or controlled by object existence, object management, object alter, and object reference authority. The user can change the object and perform basic functions on the object. *RWX authority provides object operational authority and all the data authorities.
*RX
*RX authority allows the user to perform basic operations on the object, such as run a program or display the contents of a file. The user is prevented from changing the object. *RX authority provides object operational authority and read and execute authorities.
*RW
*RW authority allows the user to view the contents of an object and modify the contents of an object. *RW authority provides object operational authority and data read, add, update, and delete authorities.
*WX
*WX authority allows the user to modify the contents of an object and run a program or search a library or directory. *WX authority provides object operational authority and data add, update, delete, and execute authorities.
*R
*R authority allows the user to view the contents of an object. *R authority provides object operational authority and data read authority.
*W
*W authority allows the user to modify the contents of an object. *W authority provides object operational authority and data add, update, and delete authorities.
*X
*X authority allows the user to run a program or search a library or directory. *X authority provides object operational authority and data execute authority.
*EXCLUDE
Exclude authority prevents the user from accessing the object. The OBJAUT value must be *NONE if this special value is used.
*NONE
The users will not be given any of the data authorities to the objects. This value cannot be used with OBJAUT value of *NONE.
authorization-list-name
Specify the name of the authorization list used.
Top

Public authority for object (OBJAUT)

Specifies the authorities given users to the object.

The possible values are:

*INDIR
The object authority is based on the authority for the directory where this object is being created. If *INDIR is used for DTAAUT, it is also required for OBJAUT.
*NONE
None of the other object authorities (existence, management, alter, or reference) will be given to the users. If *EXCLUDE or an authorization list name is specified for the DTAAUT parameter, this value must be specified.
*ALL
All of the other object authorities (existence, management, alter, and reference) will be given to the users.

Or specify up to four (4) of the following values:

*OBJEXIST
The users will be given object existence authority to the object.
*OBJMGT
The users will be given object management authority to the object.
*OBJALTER
The users will be given object alter authority to the object.
*OBJREF
The users will be given object reference authority to the object.
Top

Examples

CRTLOCALE   LOCALE('/QSYS.LIB/MYLIB.LIB/USLOCALE.LOCALE')
            SRCFILE('/QSYS.LIB/MYLIB.LIB/LSRC.FILE/USLOCALE.MBR')
            CCSID(37)  TEXT('Locale for USA')

This command creates a locale named USLOCALE in the library called MYLIB in the QSYS.LIB file system with a CCSID of 37. The text parameter describes this as a locale for the USA.

CRTLOCALE   LOCALE('/QSYS.LIB/MYLIB.LIB/USLOCALE.EXAMPLE')
            SRCFILE('/QSYS.LIB/MYLIB.LIB/LSRC.FILE/EXAMPLE.MBR')
            CCSID(*UTF))  TEXT('UTF Locale examples')

This command creates two locales named EXAMPLE_4 with a CCSID of 1232 and EXAMPLE_8 with a CCSID of 1208 in the library called MYLIB in the QSYS.LIB file system. The text parameter describes them as UTF locale examples.

Top

Error messages

*ESCAPE Messages

CPF3BE1
Locale object &1 not created.
Top