LOCALEINFO function
Syntax
LOCALEINFO (category)
Description
In NLS mode, use the LOCALEINFO function to retrieve the settings of the current locale.
category is one of the following tokens that are defined in the InfoSphere® DataStage® include file UVNLSLOC.H:
- UVLC$TIME UVLC$NUMERIC UVLC$MONETARY UVLC$CTYPE UVLC$COLLATE
- Each token returns a dynamic array containing the data being used by the specified category. The meaning of the data depends on the category; field 1 is always the name of the category or the value OFF. OFF means that locale support is disabled for a category. The elements of the array are separated by field marks.
- UVLC$WEIGHTS
- Returns the weight table.
- UVLC$INDEX
- Returns information about the hooks defined for the locale.
If the specified category is set to OFF, LOCALEINFO returns the string OFF.
If the LOCALEINFO function fails to execute, LOCALEINFO returns one of the following:
- LCE$NO.LOCALES
- NLS locales are not in force.
- LCE$BAD.CATEGORY
- Category is invalid.
Example
The following example shows the contents of the multi valued DAYS field when the locale FR-FRENCH is current. Information for LCT$DAYS is contained in the UVNLSLOC.H file in the INCLUDE directory in the UV account directory.
category.info = LOCALEINFO(LC$TIME)
PRINT category.info<LCT$DAYS>
This is the program output:
lundi}mardi}mercredi}jeudi}vendredi}samedi}dimanche