HP OpenVMS Systems Documentation
Compaq C Run-Time Library Utilities Reference Manual
Unloads the specified locale name from system memory.
LOCALE UNLOAD locale
The LOCALE UNLOAD command unloads the specified locale name from the system's memory. If a process is accessing the locale when the UNLOAD command is entered, the global sections are deleted after the process deaccesses the locale.
$ LOCALE UNLOAD JA_JP_DECKANJI
This example shows how to unload the JA_JP_DECKANJI locale.
Lists character set description files (charmaps).
LOCALE SHOW CHARACTER_DEFINITIONS
The LOCALE SHOW CHARACTER_DEFINITIONS command lists the names of the character set description files (charmaps) in the public directory defined by the logical name SYS$I18N_LOCALE.
A charmap defines the symbolic names and values of characters in a coded character set. Charmaps are used by the LOCALE COMPILE command when compiling a locale. A charmap file has the file type .CMAP.
$ LOCALE SHOW CHARACTER_DEFINITIONS [SYS$I18N.LOCALES.SYSTEM]DECHANYU [SYS$I18N.LOCALES.SYSTEM]DECHANZI [SYS$I18N.LOCALES.SYSTEM]DECKANJI [SYS$I18N.LOCALES.SYSTEM]DECKOREAN [SYS$I18N.LOCALES.SYSTEM]EUCJP [SYS$I18N.LOCALES.SYSTEM]EUCTW [SYS$I18N.LOCALES.SYSTEM]ISO8859-1 [SYS$I18N.LOCALES.SYSTEM]ISO8859-2 [SYS$I18N.LOCALES.SYSTEM]ISO8859-3 [SYS$I18N.LOCALES.SYSTEM]ISO8859-4 [SYS$I18N.LOCALES.SYSTEM]ISO8859-5 [SYS$I18N.LOCALES.SYSTEM]ISO8859-7 [SYS$I18N.LOCALES.SYSTEM]ISO8859-8 [SYS$I18N.LOCALES.SYSTEM]ISO8859-9 [SYS$I18N.LOCALES.SYSTEM]MITACTELEX [SYS$I18N.LOCALES.SYSTEM]SDECKANJI [SYS$I18N.LOCALES.SYSTEM]SJIS
This example displays the names of the charmap files, all in the SYS$I18N_LOCALE directory.
Displays a summary of the current international environment as defined by several international environment logical names.
LOCALE SHOW [CURRENT]
The LOCALE SHOW CURRENT command lists the settings for each locale category and the values of the environment variables LC_ALL and LANG.
The CURRENT keyword is the default and is, therefore, optional. The logical name that defines a category has the same name as the category. For example, the LC_MESSAGES logical name defines the setting for the LC_MESSAGES category. Table 4-3 describes the locale categories.
Table 4-3 Locale Categories Category Description LC_COLLATE Information about collating sequences LC_CTYPE Information about character classification LC_MESSAGES Information about the language of program messages and the format of yes/no prompts LC_MONETARY Information about monetary formatting LC_NUMERIC Information about formatting numbers LC_TIME Information about time and date
Each locale category is defined by scanning the following logical names in the order shown, until a logical name is found. If the logical name found does not represent a valid locale file, LOCALE SHOW displays the string "C" for all the categories.
- Logical names corresponding to the categories specified in the table (For example, if LC_NUMERIC is specified as a valid locale category, the LOCALE SHOW CURRENT command displays the name of the category and the locale name it defines.)
- The system default for the locale categories as specified by the SYS$* logical names. (For example, the default for the category LC_NUMERIC is defined by the SYS$LC_NUMERIC logical name.)
The system manager can choose to define SYS$* logicals in the site-specific system startup files to set the default locale. If no definition is provided, programs operate using the built-in "C" locale, in which case the LOCALE SHOW CURRENT command displays the string "C" for the current locale categories.
If any logical names that define the environment are improperly defined, no warning message is issued. However, the actual international environment is listed exactly as it would be seen by an application that uses the Compaq C Run-Time Library routine setlocale (for instance, if in the previous example the SPECIAL.LOCALE file does not exist, then the display for the LC_MESSAGES category would show LC_MESSAGES="C").
$ DEFINE LC_COLLATE EN_US.ISO8859-1 ! NOTE: the collate category in unquoted $ DEFINE LANG EN_GB_ISO8859-1 $ DEFINE LC_MESSAGES PRIVATE$DISK:[APPL.LOCALES]SPECIAL.LOCALE $ LOCALE SHOW CURRENT LANG="EN_GB_ISO8859-1" LC_CTYPE="EN_GB_ISO8859-1" LC_COLLATE=EN_US_ISO8859-1 LC_TIME="EN_GB_ISO8859-1" LC_NUMERIC="EN_GB_ISO8859-1" LC_MONETARY="EN_GB_ISO8859-1" LC_MESSAGES=PRIVATE$DISK:[APPL.LOCALES]SPECIAL.LOCALE;1 LC_ALL=
This example shows a process where all locale categories except LC_COLLATE and LC_MESSAGES have defaulted to the same locale, EN_GB.ISO8859-1. A setting enclosed in double quotation marks indicates that the setting is implied by the setting of one of the following logical names: LANG, LC_ALL, SYS$LC_ALL, or SYS$LANG. A setting not enclosed by double quotes indicates that the logical name for that category defines the international environment. This example also shows that if a locale category is specified by a complete file specification, then the complete file specification is displayed.
Lists all the public locales on the system.
LOCALE SHOW PUBLIC
The LOCALE SHOW PUBLIC command lists all the public locales on the system. The set of public locales contains all the locales that reside in the directory defined by the logical name SYS$I18N_LOCALE as well as the system's built-in locales supplied with the Compaq C Run-Time Library.
$ LOCALE SHOW PUBLIC C (Built-in) POSIX (Built-in) [SYS$I18N.LOCALES.SYSTEM]EN_GB_ISO8859_1 [SYS$I18N.LOCALES.SYSTEM]EN_US_ISO8859_1 [SYS$I18N.LOCALES.SYSTEM]FR_CA_ISO8859_1 [SYS$I18N.LOCALES.SYSTEM]GRBAGE_LOCALE (bad file header checksum) [SYS$I18N.LOCALES.SYSTEM]JA_JP_DECKANJI (Permanently Loaded)
This example shows a system with three locale files in the SYS$I18N_LOCALE directory. The C and POSIX locales are built in with the system and, therefore, cannot be found in the SYS$I18N_LOCALE directory.
This example also shows the effect of having a bad file or a nonlocale file in the public directory and the effect of having a locale file loaded into the system's memory by the LOCALE LOAD command.
Displays the value of one or more keywords from the current international environment.
LOCALE SHOW VALUE name
nameRequired. Specifying more than one name is valid.
Name of one of the following:
- If you specify a keyword, the value of that keyword in the current locale is displayed.
- For integer keywords that have no value assigned, the value CHAR_MAX (127) is displayed.
- When a keyword value includes semicolons, double quotes, backslashes, or control characters, they are preceded by an escape character (usually a backslash).
If you specify a category, the values of the keywords in that category are displayed.
Table 4-4 lists the categories and keywords you can specify.
Table 4-4 Locale Categories and Keywords Category Keyword Keyword Description LC_CTYPE Character classification names LC_TIME DAY Full weekday names ABDAY Abbreviated weekday names MON Full month names ABMON Abbreviated month names D_T_FMT Date and time format D_FMT Date format T_FMT Time format T_FMT_AMPM Time format in the 12-hour clock AM_PM Defines how the ante meridiem (a.m.) and post meridiem (p.m.) strings are represented ERA Defines how years are counted and displayed for eras in a locale ERA_D_FMT Era date format ERA_D_T_FMT Era date and time format ERA_T_FMT Era time format ALT_DIGITS String defining alternative symbols for digits LC_NUMERIC DECIMAL_POINT Character used as a decimal delimiter THOUSANDS_SEP Character used to group digits to the left of the decimal delimiter GROUPING Defines how characters to the left of the decimal delimiter are grouped LC_MONETARY INT_CURR_SYMBOL Character string representing the international currency symbol. CURRENCY_SYMBOL String used as the local currency symbol. MON_DECIMAL_POINT Character used as a decimal delimiter when formatting monetary quantities. MON_THOUSANDS_SEP Character used as a separator for groups of digits to the left of the decimal delimiter. POSITIVE_SIGN String used to represent positive monetary quantities. NEGATIVE_SIGN String used to represent negative monetary quantities. INT_FRAC_DIGITS Number of digits displayed to the right of the decimal delimiter when formatting monetary quantities using the international currency symbol. FRAC_DIGITS Number of digits displayed to the right of the decimal delimiter when formatting monetary quantities using the local currency symbol. P_CS_PRECEDES For positive monetary values, this is set to 1 if the local currency symbol precedes the number and 0 if the symbol follows the number. N_CS_PRECEDES For negative monetary values, this is set to 1 if the local currency symbol precedes the number and 0 if the symbol follows the number. P_SEP_BY_SPACE For positive monetary values, this is set to 0 if there is no space between the currency symbol and the value, 1 if there is a space, and 2 if there is a space between the symbol and the sign string. N_SEP_BY_SPACE For negative monetary values, this is set to 0 if there is no space between the currency symbol and the value, 1 if there is a space, and 2 if there is a space between the symbol and the sign string. P_SIGN_POSN Integer used to indicate where the POSITIVE_SIGN string should be placed. N_SIGN_POSN Integer used to indicate where the NEGATIVE_SIGN string should be placed. MON_GROUPING Defines how digits are grouped when formatting monetary values. LC_MESSAGES YESSTR String representing YES in the current locale. NOSTR String representing NO in the current locale. YESEXPR Expression representing an affirmative response in the current locale. NOEXPR Expression representing a negative response in the current locale.
When an environment variable that affects the setting of the current locale points to an invalid locale, the "C" locale is set.
Other valid keywords that are not displayed by default as part of any category include:
- CHARMAP --- Displays the file specification of the charmap used when the locale was created.
- CODE_SET_NAME --- Defines the name of the coded character set for which the charmap file is defined.
- MB_CUR_MAX --- Defines the maximum number of bytes in a multibyte character.
- MB_CUR_MIN --- Defines the minimum number of bytes in a character in the coded character set.
/CATEGORYOptional. Default: No display of category name.
Displays the category name before each keyword.
/KEYWORDOptional. Default: No display of keyword name.
Displays the keyword name before the value of a keyword.
The LOCALE SHOW VALUE command displays the value of one or more keywords from the current international environment.
%LOCALE-E-NOKEYFND, no keyword keyword-name found
The keyword-name you specified is not valid. Specify only the keywords listed in Table 4-4.
$ LOCALE SHOW VALUE NOEXPR "^[nN][[:alpha:]]*"
Issuing LOCALE SHOW VALUE without qualifiers displays the value of the NOEXPR string.
$ LOCALE SHOW VALUE /CATEGORY NOEXPR LC_MESSAGES "^[nN][[:alpha:]]*"
Specifying /CATEGORY displays the category name (LC_MESSAGES) before the value of the NOEXPR string.
$ LOCALE SHOW VALUE /KEYWORD NOEXPR noexpr= "^[nN][[:alpha:]]*"
Specifying /KEYWORD displays the keyword name before its value.
$ LOCALE SHOW VALUE /KEYWORD /CATEGORY NOEXPR LC_MESSAGES noexpr= "^[nN][[:alpha:]]*"
Specifying /KEYWORD and /CATEGORY displays the category and keyword name before the keyword value.
Using the data in the specified time zone source file, creates binary files containing time zone conversion information.
zic [-v] ["-L" leapseconds] [-d directory] [-y yearistype] infile
Source file that zic reads.
Flags if a year that appears in a data file is outside the range of years representable by time values.
Reads leap second information from the file with the given name. If this option is not used, no leap second information appears in the output files.
Creates time conversion information files in the named directory rather than in the standard directory.
Uses the given command file rather than yearistype when checking year types.
The zic command allows the ZIC compiler to read text from the files named on the command line, and then creates the time conversion information files specified with this input.
If a file name is - , the standard input is read.
Input lines consist of fields. Any number of white space characters separate the fields. Leading and trailing white spaces on input lines are ignored. An unquoted number sign (#), the sharp character, in the input line introduces a comment that extends to the end of the line where this sign appears. White space characters and sharp characters can be enclosed in double quotation marks (" ") if they are to be used as part of a field. Any line that is blank after comment stripping is ignored.
Non-blank lines are expected to be one of three types:
$ zic -v "-L" leapseco -d [-] myafrica
The ZIC compiler compiles the time zone source file myafrica. Based on the specified parameters, ZIC does the following:
- Flags years outside the representable range
- Builds an output file with leapsecond corrections applied
- Puts the result in the current directory
For more information about date/time functions, see the Compaq C Run-Time Library Reference Manual for OpenVMS Systems.