Format 10: SET for locale categories
This format of the SET statement allows you to set and query the locale categories of the current locale.
A locale is a system object containing
language
and cultural information. For example, a locale contains the appropriate
format for a date or time in a particular region of the world. The
information in a locale is divided into locale categories.
For example, locale category LC_TIME contains information about date
and time formats. For each run unit there is a DEFAULT locale, a current
locale, and from zero to many specific locales. The current locale
is altered by setting some or all of its locale categories to the
DEFAULT or a specific locale. The name of the specific locale to which
a locale category (of the current locale) was set can be placed into
an identifier. The contents of a locale category can be changed by
setting the locale category from:
- The system default
- A locale defined in an alphanumeric elementary data item
- The mnemonic-name specified in the SPECIAL-NAMES paragraph.
- LC_ALL
- Locale categories LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME, and LC_TOD, as well as any other categories included in the locale.
- LC_COLLATE
- The locale category that defines collation sequence.
- LC_CTYPE
- The locale category that defines character classification and character type.
- LC_MESSAGES
- The locale category that defines formatting of informative and diagnostic messages, and interactive responses.
- LC_MONETARY
- The locale category that defines monetary formatting.
- LC_NUMERIC
- The locale category that defines numeric formatting.
- LC_TIME
- Thelocale category that defines date and time formatting.
- LC_TOD
- The locale category that defines definitions of time zone differences, time zone names, and Daylight Saving Time start and end points.
- identifier-10
- The value of identifier-10 references a locale-category. identifier-10 must be an elementary alphanumeric data item. If the INTO phrase is specified, the identification of the current locale for the specified category is stored in the data item referenced by identifier-10. The INTO phrase is processed before the FROM phrase, using the rules of the MOVE statement for an alphanumeric-to-alphanumeric move.
- DEFAULT
- Sets the locale category to the current default. The default locale exists at the time a run unit is activated, and remains the default for the duration of the run unit. The default locale also becomes the current locale at the time a run unit is activated, and remains the current locale until it is switched using Format 10 of the SET statement.
- identifier-12
- The value of identifier-10 references a locale-category. identifier-12 must reference an elementary alphanumeric data item. If the locale specified in identifier-12 is not available, an operating system escape message is issued. If the FROM phrase is specified, the current locale for the specified category is set to the content of the data item referenced by identifier-12. The identification of the current locale is stored using the rules of the MOVE statement for an alphanumeric-to-alphanumeric move.
- mnemonic-name-2
- If the locale specified in mnemonic-name-2 is not available, an operating system escape message is issued. If the FROM phrase is specified, the current locale for the specified category is set to the locale category identified by mnemonic-name-2.