Configuring CMS FOCUS for NLS Services

In this section:

The NLS feature enables FOCUS to support many different languages. Each supported language has an associated code page. In FOCUS, the mapping of graphic characters from one code page into the graphic characters of another is managed by the FOCUS NLS translation component.

Note: NLS is only supported if your terminal emulator is IBM Personal Communications (PC3270).


Top of page

x
Graphic Character Representation

The graphic character representation standards used by FOCUS conform to IBM's Character Data Representation Architecture (CDRA). For more information on these standards and a description of the layout of each code page and its corresponding Graphic Character Global Identifiers (GCGIDs), see IBM's CDRA Library documentation set (SC09-9391-00 Registry).


Top of page

x
Character Mapping

The mapping of graphic characters from one code page into the graphic characters of another is managed by the NLS translation services component of FOCUS. To achieve this character-to-character conversion, FOCUS has a set of pre-defined translation tables resident in memory at run time.

The configuration process allows an installation to identify the code pages required for FOCUS operations.

The TSGU EXEC is used to generate TRANTBL ERRNLS, the code page translation table.


Top of page

x
DBCS Support

Double Byte Character Set (DBCS) refers to those character sets (language sets) that require two bytes to represent each graphic character. These character sets are represented by IBM as a combination of a Single Byte Character Set (SBCS) code page and a DBCS code page, in order to support single-byte code points. NLS represents each DBCS code page as an SBCS code page and a translation table.


Top of page

x
Code Page Handling

Code pages required for your enterprise are selected from the samples supplied on your FOCUS distribution tape. The samples are found in CPXCPTBL EDANLS. For example:

Code Page

Character Type

DBCS

Description

CP00037
E
SBCS
US IBM MF EBCDIC Code
CP00437
A
SBCS
US PC ASCII Code

The default code page employed by FOCUS is CP00037, the US Mainframe (MF) EBCDIC code page. The following are the default code pages enabled:



x
Customizing NLS

You need to customize NLS only if your site requires support for code pages other than the defaults described in the previous section.


Top of page

x
Configuring NLS

How to:

To configure NLS for FOCUS:

  1. Identify the code page used by VM FOCUS.
  2. Edit the CPCODEPG EDANLS file, specifying the set of code pages identified in How to Identify the FOCUS Code Page.
  3. Execute the TSGU EXEC to generate the translation table and other files.
  4. Configure default NLS characteristics.
  5. Configure sort sequences.
  6. Configure monocasing.


x
Procedure: How to Identify the FOCUS Code Page

By default, VM FOCUS supports the US MF EBCDIC code page (CP00037). If FOCUS requires a code page other than the default, select the desired code page from the list of FOCUS-supported code pages. Refer to CPXCPTBL EDANLS. The code page relates directly to the language for which the data sources are generated.

If a desired code page is not found on the list provided, refer to the appropriate IBM CDRA document and create your own, or contact Customer Support Services (CSS) at (800) 736-6130 or (212) 736-6130.

CPXCPTBL EDANLS contains a list of available code pages. The format is:

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:

A For ASCII.

E For EBCDIC.

dbcs-id

Is the DBCS identifier (DBCSID). See NLSCFG ERRORS File for the possible values.

description

Is a description of the code page.

The following is part of the supplied CPXCPTBL EDANLS:

Codepage  C DBCS  Description
--------  - ----  ------------------------------------------------------
CP00037   E SBCS  US IBM MF EBCDIC code
CP00437   A SBCS  US PC ASCII code
CP00137   A SBCS  ANSI character set for MS-Windows
CP00500   E SBCS  IBM MF International European
CP00273   E SBCS  IBM MF Germany F.R./Austria
CP00277   E SBCS  IBM MF Denmark, Norway
CP00278   E SBCS  IBM MF Finland, Sweden
CP00280   E SBCS  IBM MF Italy
CP00284   E SBCS  IBM MF Spain/Latin America
CP00285   E SBCS  IBM MF United Kingdom
CP00297   E SBCS  IBM MF France
CP00420   E SBCS  IBM MF Arabic Bilingual
CP00424   E SBCS  IBM MF Israel(Hebrew)
CP00850   A SBCS  IBM PC Multinational
CP00851   A SBCS  IBM PC Greece
CP00856   A SBCS  IBM PC Hebrew
CP00860   A SBCS  IBM PC Portugal
CP00861   A SBCS  IBM PC Iceland
CP00863   A SBCS  IBM PC Canadian French
CP00864   A SBCS  IBM PC Arabic
CP00865   A SBCS  IBM PC Nordic
CP00871   E SBCS  IBM MF Iceland
CP00875   E SBCS  IBM MF Greece
CP00637   A SBCS  DEC Multinational Character Set
CP00600   A SBCS  DEC German NRC Set
CP00604   A SBCS  DEC British ( United Kingdom ) NRC Set
CP00608   A SBCS  DEC Dutch ( Netherland ) NRC Set
CP00612   A SBCS  DEC Finnish ( Finland ) NRC Set
CP00616   A SBCS  DEC French ( Flemish and French/Belgian ) NRC Set
CP00620   A SBCS  DEC French Canadian NRC Set
CP00624   A SBCS  DEC Italian ( Italy ) NRC Set
CP00628   A SBCS  DEC Norwegian/Danish ( Norway,Denmark ) NRC Set
CP00632   A SBCS  DEC Portugal NRC Set
CP00636   A SBCS  DEC Spanish ( Spain ) NRC Set
CP00640   A SBCS  DEC Swedish ( Sweden ) NRC Set
CP00644   A SBCS  DEC Swiss ( Swiss/French and Swiss/German ) NRC Set
CP00930   E SOSI  Japanese IBM MF Katakana Code Page (cp290+cp300)
CP00939   E SOSI  Japanese IBM MF Latin Extended (cp1027+cp300)
CP00932   A SJIS  Japanese PC Shift-JIS (cp897+cp301)
CP00942   A SJIS  Japanese PC Shift-JIS Extended (cp1041+cp301)
CP10942   A EUC   Japanese PC EUC
CP10930   E SOSIF Japanese Mainframe ( Fujitsu )
CP20930   E SOSIH Japanese Mainframe ( Hitachi )


x
Procedure: How to Edit the CPCODEPG EDANLS File

The set of code page numbers, collected in How to Identify the FOCUS Code Page, must be added to CPCODEPG EDANLS. Each code page number should be added, each on a separate line in this file.

The format of each line is

CPnnnnn  bcccc...

where:

CP

Is the code page prefix (always CP).

nnnnn

Is the code page number.

b

Is one of the following:

A For ASCII.

E For EBCDIC, but is treated as a comment.

cccc...

Is a description of the code page.

The following is the sample CPCODEPG EDANLS file distributed with VM FOCUS:

CP00037   E SBCS  US IBM MF EBCDIC code
CP00437   A SBCS  US PC ASCII code
CP01047   E SBCS  IBM MF Open Systems (Latin1)
CP65001   A UTF8  Unicode (UTF-8)
CP00137   A SBCS  ANSI Character Set for MS-Windows


x
Procedure: How to Execute the TSGU EXEC

The TSGU (Transcoding Services Generation Utility) EXEC is a utility program that generates the NLS translation table (TRANTBL ERRNLS), customized for your site based on the list of code pages defined in How to Edit the CPCODEPG EDANLS File.

The TSGU EXEC is provided on your distribution tape. Run it now. The output is TRANTBL ERRNLS.

If you get a duplicate GCGID, choose one to discard and replace it with eight periods:

........

Additional steps confirm the generated information:

The TSGU EXEC also generates NLS sort tables (SORTTBL ERRNLS) and NLS case tables (CASETBL ERRNLS), described in How to Configure Sort Sequences, and How to Configure Monocasing, respectively.



x
Procedure: How to Configure Default NLS Characteristics

NLS is configured by editing the default NLS configuration file NLSCFG ERRORS.

In most cases, it is enough just to change the LANG= parameter, as this will set all other parameters to valid values. The file LANGTBL ERRORS contains valid languages.

The format is:

mmm aaaaaaaaaaaa bbb nnnnn cc

where:

mmm

Is a language code (the international dial code).

aaaaaaaaaaaa

Is the 12-character language name.

bbb

Is a 3-character language abbreviation (language ID).

nnnnn

Is the code page number (from CPnnnnn EDANLS).

cc

Is the hexadecimal value of the dollar symbol ($).

The default LANGTBL ERRORS file is:

<---><----------><-><---><>
  001AMENGLISH      00037
  001ENGLISH        00037
  045DANISH      DAN0027767
  031DUTCH       DUT00037
  358FINNISH     FIN0027867
  033FRENCH      FRE00297
  049GERMAN      GER00273
  049GERMAN      GE500500
  030GREEK       GRE00875
  972HEBREW      HEB00424
  039ITALIAN     ITA00280
  081JAPANESE    JPN00930E0
  081JAPANESE    JPE00939
  082KOREAN      KOR00933
  047NORWEGIAN   NOR0027767
  351PORTUGUESE  POR00037
  034SPANISH     SPA00284
  046SWEDISH     SWE0027867
  086T-CHINESE   ROC00937
  090TURKISH     TUR01026AD
  044UKENGLISH   UKE002854A   

Note: The language customized should match the code page customized in CPCODEPG EDANLS. For example, suppose LANGTBL ERRORS contains the following entry:

.
.
.
081 JAPANESE JPN 00930 
.
.
.

NLSCFG ERRORS would contain this entry, with the value for LANG matching the abbreviation for the language in LANGTBL ERRORS:

LANG=JPN 
.
.
.

CPCODEPG EDANLS would contain the following entry, with the code page number matching the code page number in LANGTBL ERRORS:

CP00930 E DBCS Japanese


x
Procedure: How to Configure Sort Sequences

By default, FOCUS uses a binary sort sequence. If you want to use a weighted sort, you can customize the sort tables. The customized sort table is generated by the TSGU EXEC in SORTTBL ERRNLS.

Note: This step is necessary only if you want to change the default sort sequence.

CPnnnnn EDANLS files have sort weight values for each character. To change those values, perform the following:

  1. Edit the CPCODEPG EDANLS file by adding the required code pages. CPCODEPG EDANLS is the same file described in How to Edit the CPCODEPG EDANLS File. Normally the same file is used to generate SORTTBL ERRNLS.
  2. Edit the CPnnnnn EDANLS files. These files contain the Code Point and GCGIDs (Graphic Character Global Identifiers) that are used by the TSGU EXEC to generate TRANTBL ERRNLS. Here you may change 'Sort weight' in the fourth column. See NLSCFG ERRORS File for the format of a code page entry.

    For example, CP00437 contains the following lines, which represent code points and their corresponding GCGIDs and other attributes:

  3. Execute the TSGU EXEC with the parameter SORT. For more information, see How to Execute the TSGU EXEC.


x
Procedure: How to Configure Monocasing

By default, all requests, except for data between single quotation marks, are converted to uppercase according to the default CASETBL ERRNLS file. This feature converts a-z to A-Z only.

If you require any other monocasing (for example, Swedish letters), you must customize NLS monocasing. The supplied functions, LOWERCASE and UPPERCASE, respect the NLS CASETBL ERRNLS file.

NLS monocasing involves language-sensitive (code page-sensitive) uppercase and lowercase conversion. Each character's attributes are customizable. The customized information is generated by the TSGU EXEC in CASETBL ERRNLS.

CPnnnnn EDANLS files have the information for changing the attributes of each character. To change them, perform the following steps:

  1. Edit the CPCODEPG EDANLS file by adding the required code pages. This is the file described in How to Edit the CPCODEPG EDANLS File. Normally the same file is used to generate CASETBL ERRNLS.
  2. Edit the CPnnnnn EDANLS files. CPnnnnn EDANLS files contain the Code Point and GCGIDs that are also used to generate TRANTBL ERRNLS. Here you may change 'GCGID uppercase' in the third column and 'Character type' in the fifth column. See NLSCFG ERRORS File for the format of CPnnnnn EDANLS files.
  3. Execute the TSGU EXEC with the parameter CASE. For more information, see How to Execute the TSGU EXEC.

Top of page

x
NLSCFG ERRORS File

The NLSCFG ERRORS file contains information regarding the NLS setup for FOCUS. For more information, see How to Configure Default NLS Characteristics.

LANG

Language. LANGTBL ERRORS contains valid values. For more information, see How to Configure Default NLS Characteristics. The value of LANG determines the defaults for other parameters. (The default value is AMENGLISH.)

CODE_PAGE

FOCUS' code page. (The default value is 37.)

DBCS

The DBCS identifier (DBCSID). Valid DBCSIDs are:

SBCS (OFF or 0) No DBCS enabled.

SOSI IBM MF SOSI DBCS enabled.

The default is SBCS.

CDN

Continental Decimal Notation. ',' or '.' (default '.').

DATETIME

DATE/TIME format for SQL:

EDA EDA type (default). For VM, the default format is HYYMDs.

ISO yyyy-mm-dd hh.mm.ss

USA mm/dd/yyyy hh:mm AM or PM

EUR dd.mm.yyyy hh.mm.ss

JIS yyyy-mm-dd hh:mm:ss

LOCAL Any site-defined form

Some parameters depend on other parameter settings:

LANG

Overrides CODE_PAGE derived from LANG through LANGTBL ERRORS.

CODE_PAGE

Overrides DBCS derived from CODE_PAGE through CPXCPTBL EDANLS.

DBCS

Overrides SHIFT_LENGTH, SHIFT_OUT, SHIFT_IN, and CODE_PAGE.


Top of page

x
Configuration Examples

In the following examples, asterisks in the first column indicate that the line is a comment, in which the parameter is set by default by the preceding parameters. Lines are parsed in order, so if the same parameter recurs, its first value is overridden by the following value.



Example: Specifying US English Mainframe FOCUS

To specify US mainframe FOCUS:

LANG = AMENGLISH


Example: Specifying Japanese Mainframe FOCUS

To specify Japanese mainframe FOCUS:

LANG  = JPN
*CODE_PAGE = 930
DEFAULT_ASCII = 942
DEFAULT_EBCDIC = 930
*DBCS  = SOSI


Example: Specifying German Mainframe FOCUS

To specify German mainframe FOCUS:

LANG  = GER
*CODE_PAGE = 273
DEFAULT_ASCII = 850
DEFAULT_EBCDIC = 273


Example: Specifying German Mainframe FOCUS for International European Code Page

To specify German mainframe FOCUS:

LANG  = GE5
*CODE_PAGE = 500
DEFAULT_ASCII = 850
DEFAULT_EBCDIC = 500


Example: Specifying Korean Mainframe FOCUS

To specify Korean mainframe FOCUS:

LANG  = KOR
*CODE_PAGE = 933
DEFAULT_ASCII = 949
DEFAULT_EBCDIC = 933
*DBCS  = SOSI


Example: Specifying Taiwanese Mainframe FOCUS

To specify Taiwanese mainframe FOCUS:

LANG  = ROC
*CODE_PAGE = 937
DEFAULT_ASCII = 10948
DEFAULT_EBCDIC = 937
*DBCS  = SOSI


Information Builders