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).
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).
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.
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.
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:
You need to customize NLS only if your site requires support for code pages other than the defaults described in the previous section.
How to: |
To configure NLS for FOCUS:
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:
Is the code page prefix (always CP).
Is the code page number.
Is the character type:
A For ASCII.
E For EBCDIC.
Is the DBCS identifier (DBCSID). See NLSCFG ERRORS File for the possible values.
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 )
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:
Is the code page prefix (always CP).
Is the code page number.
Is one of the following:
A For ASCII.
E For EBCDIC, but is treated as a comment.
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
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.
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:
Is a language code (the international dial code).
Is the 12-character language name.
Is a 3-character language abbreviation (language ID).
Is the code page number (from CPnnnnn EDANLS).
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
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:
For example, CP00437 contains the following lines, which represent code points and their corresponding GCGIDs and other attributes:
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:
The NLSCFG ERRORS file contains information regarding the NLS setup for FOCUS. For more information, see How to Configure Default NLS Characteristics.
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.)
FOCUS' code page. (The default value is 37.)
The DBCS identifier (DBCSID). Valid DBCSIDs are:
SBCS (OFF or 0) No DBCS enabled.
SOSI IBM MF SOSI DBCS enabled.
The default is SBCS.
Continental Decimal Notation. ',' or '.' (default '.').
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:
Overrides CODE_PAGE derived from LANG through LANGTBL ERRORS.
Overrides DBCS derived from CODE_PAGE through CPXCPTBL EDANLS.
Overrides SHIFT_LENGTH, SHIFT_OUT, SHIFT_IN, and CODE_PAGE.
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.
To specify US mainframe FOCUS:
LANG = AMENGLISH
To specify Japanese mainframe FOCUS:
LANG = JPN *CODE_PAGE = 930 DEFAULT_ASCII = 942 DEFAULT_EBCDIC = 930 *DBCS = SOSI
To specify German mainframe FOCUS:
LANG = GER *CODE_PAGE = 273 DEFAULT_ASCII = 850 DEFAULT_EBCDIC = 273
To specify German mainframe FOCUS:
LANG = GE5 *CODE_PAGE = 500 DEFAULT_ASCII = 850 DEFAULT_EBCDIC = 500
To specify Korean mainframe FOCUS:
LANG = KOR *CODE_PAGE = 933 DEFAULT_ASCII = 949 DEFAULT_EBCDIC = 933 *DBCS = SOSI
To specify Taiwanese mainframe FOCUS:
LANG = ROC *CODE_PAGE = 937 DEFAULT_ASCII = 10948 DEFAULT_EBCDIC = 937 *DBCS = SOSI
Information Builders |