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.
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.
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.
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.
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.
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.
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.
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.
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.