Using the NLS Configuration Files

How to:

Reference:

This section provides detailed descriptions of the NLSCFG configuration file, the Code Page Definition File (CPnnnnn), and the Known Code Page File (CPXCPTBL).

Syntax: How to Use the NLS Configuration File (NLSCFG)

The NLSCFG configuration file controls the code page and the language used for error messages and characters in FOCUS. You can configure several different code pages and languages in the CPCODEPG file. Using the NLSCFG file, you can specify which one will be in effect when you invoke FOCUS.

You change the FOCUS code page and language by entering LANG and CODE_PAGE settings in the NLSCFG configuration file. Changing the LANG setting sets all other parameters to valid values.

Note: The LANG setting should match the three-character language abbreviation (language ID) or the language name.

You can find the appropriate language abbreviation for each code page in member CPCPALL in the alias library install_hlq.ERRNLS.DATA. The following shows a portion of the CPCPALL file, which includes the language setting for code page 297:

* LANG=FRE
cp297
cp863
cp137
cp1047
cp37
cp65001
BR
* LANG=GER
cp273
cp850
cp137
cp1047
cp37
cp65001
BR

If you do not configure FOCUS for NLS services, the LANG value used by FOCUS is AMENGLISH. To change the default language to French, enter the following setting in the NLSCFG configuration file:

LANG = FRE

Error messages are only translated for German, Spanish, French, Dutch, and Japanese. Error messages for all other languages are translated to English.

Note: Swedish and some other languages may only be partially translated.

The following is a reference of keywords in the NLSCFG file and their associated values:

LANG=

Is the language. The list of known languages file (CPCPALL), located in install_hlq.ERRNLS.DATA, contains a list of valid values. The value of LANG determines the defaults for other parameters in FOCUS. The default value is AMENGLISH (American English).

COLLATION=

Establishes the collation (sort) sequence. Valid values are:

  • CODEPAGE. Bases collation sequence on the code page in effect. This is the default value.
  • BINARY. Bases the collation sequence on binary values. When code page files are not modified, CODEPAGE is the same as BINARY, except when LANGUAGE is Danish, Finnish, German, Norwegian or Swedish in an EBCDIC environment.
  • SRV_CS. Bases collation sequence on the LANGUAGE setting, and is case-sensitive.
  • SRV_CI. Bases collation sequence on the LANGUAGE setting, and is case-insensitive

This setting can be overridden by the SET COLLATION command.

DATEOUTPUT=

Localizes month and week names on date format output for display options T, t, TR, tr, W, w, WR and wr. Valid values are:

  • DEFAULT. Generates English month and week names regardless of the language setting. This is the default setting.
  • LOCALIZED. Generates localized month and week names for the current language setting.

    For example, assume FOCUS is configured to use French code page 297. In the following request, the HIRE_DATE field is displayed with the YYMDtr display option:

    TABLE FILE EMPLOYEE
    SUM CURR_SAL HIRE_DATE/YYMDtr
    BY DEPARTMENT
    ON TABLE SET PAGE NOPAGE
    END

    Omitting the DATEOUTPUT setting from NLSCFG or entering DATEOUTPUT=DEFAULT displays month names in English:

    DEPARTMENT         CURR_SAL  HIRE_DATE
    ----------         --------  ---------
    MIS             $108,002.00  1981, November  2
    PRODUCTION      $114,282.00  1982, February  2

    Entering the setting DATEOUTPUT=LOCALIZED in NLSCFG translates month names to French:

    DEPARTMENT         CURR_SAL  HIRE_DATE
    ----------         --------  ---------
    MIS             $108,002.00  1981, novembre  2
    PRODUCTION      $114,282.00  1982, février  2
CURRENCY=

Is a one-to-four character string or a hexadecimal value that identifies a currency symbol. You can use any characters. The default currency symbol is the dollar sign ($). Examples of popular currency symbols and their corresponding character abbreviations include the following.

  • or EUR for euro.
  • ¥ or JPY for yen.
  • $ or USD for U.S. dollar. This is the default currency symbol.
  • £ or GBP for British pound sterling.
  • NIS for Israeli New Shekel.

The following are examples of hexadecimal values for code page 137.

  • 0x80 for the euro symbol.
  • 0x24 for the dollar sign.

Example: Sample NLSCFG File

The following NLSCFG file specifies French as the language and 297 as the code page.

LANG=FRE
CODE_PAGE = 297
DATEOUTPUT=DEFAULT
COLLATION=CODEPAGE

Syntax: How to Use the Code Page Definition File (CPnnnnn)

The code page definition file install_hlq.ERRNLS.DATA(CPnnnnn) contains information on the characters for each code point value in the code page.

dd aaaaaaaa aaaaaaaa xx h

where:

dd

Is the hexadecimal code point value (00 through FF).

aaaaaaaa

Is the Graphic Character Global IDentifier (GCGID).

xx

Is the Sort weight. Consists of a hexadecimal code point value (00 through FF).

h

Is the character type. Possible values are:

L for Lower-case alphabet.

U for Upper-case alphabet.

A for Asian (non-alphabet) character.

D for Digit.

S for Special character.

C for Control (non-printable) character.

Reference: Structure of the Known Code Page File (CPXCPTBL)

When you add code pages to the FOCUS configuration, you copy code page information from the known code page file, member CPXCPTBL in the install_hlq.ERRNLS.DATA library.

CPnnnnn b dbcs-id description

where:

CP

Is the code page prefix (always CP).

nnnnn

Is the code page number.

b

Is the character type. Possible values are:

A for ASCII.

E for EBCDIC.

dbcs-id

Is the DBCS identifier (DBCSID).

description

Is a description of the code page.


Information Builders