Skip Headers

Oracle® Transparent Gateway for IBM DRDA Installation and User's Guide
Release 9.2.0.1.0 for MS Windows
Part Number A96195-01
Go To Table Of Contents
Contents
Go To Index
Index

Previous Next

D
National Language Support

This appendix documents the National Language Support (NLS) information for the Oracle Transparent Gateway for IBM DRDA.  This supplements the general Oracle NLS information found in the Oracle9i Application Developer's Guide - Fundamentals.

National Language Support enables Oracle applications to interact with users in their native language, using their conventions for displaying data.  The Oracle NLS architecture is data-driven, enabling support for specific languages and character encoding schemes to be added without any changes in source code.

There are a number of different settings in the gateway, DRDA server, Oracle9i server, and client that affect NLS processing.  In order for translations to take place correctly, character settings of these components must be compatible.

This appendix contains the following sections:

Overview of NLS Interactions

Figure D-1 illustrates NLS interactions within your system, including each component of your system and the parameters of each component that affect NLS processing in a distributed environment.  Table D-1 describes the architecture illustrated in Figure D-1.

Figure D-1 Architecture of NLS Interactions with Your System Components

Description of dx1.gif is contained in the surrounding text

Table D-1 describes in detail the parameters and variables needed for NLS processing within each of your system environments: the client environment, the Oracle integrating server, the gateway, and the DRDA server.

Table D-1 Parameters Needed for NLS Processing in Your System Environments

Environment Parameter or Variable Description
Client NLS_LANG an environmental variable.  NLS_LANG sets the NLS environment that is used by the database, both for the server session and for the client application.  This ensures that the language environments of both database and client application are automatically the same.  Because NLS_LANG is an environment variable, it is read by the client applications at startup time.  The client communicates the information defined in NLS_LANG to the server when it connects.  Refer to "Client and Oracle Integrating Server Configuration" for detailed information.
Oracle integrating server CHARACTER SET This option is set during creation of the database.  CHARACTER SET determines the character encoding scheme that is used by the database.  CHARACTER SET is defined at database creation in the CREATE DATABASE statement.  All data columns of type CHAR, VARCHAR2, and LONG have their data stored in the database character set.  Refer to "Client and Oracle Integrating Server Configuration" for detailed information.
Oracle Transparent Gateway for IBM DRDA
ORA_NLS33 an environmental variable.  ORA_NLS33 determines where the gateway loads its character sets and other language data.  Refer to "Gateway Language Interaction with DRDA Server " for detailed information.
Oracle Transparent Gateway for IBM DRDA
NLS_LANG an environmental variable.  NLS_LANG defines the character set that is used for communication between the gateway and the Oracle integrating server.  Refer to "Gateway Language Interaction with DRDA Server " for detailed information.
Oracle Transparent Gateway for IBM DRDA
HS_LANGUAGE an initialization parameter.  HS_LANGUAGE defines the character set that is used for communication between the gateway and the DRDA server.  Refer to "Gateway Language Interaction with DRDA Server " for detailed information.
Oracle Transparent Gateway for IBM DRDA
HS_NLS_DATE_FORMAT an initialization parameter.  HS_NLS_DATE_FORMAT specifies the format for dates that are used by the DRDA server.  Refer to "Gateway Language Interaction with DRDA Server " for detailed information.
Oracle Transparent Gateway for IBM DRDA
HS_NLS_DATE_LANGUAGE an initialization parameter.  HS_NLS_DATE_LANGUAGE specifies the language that is used by the DRDA server for day and month names, and for date abbreviations.  Refer to "Gateway Language Interaction with DRDA Server " for detailed information.
DRDA Server CCSID CCSID is the server character set that is mapped in the gateway to the equivalent Oracle character set.  The CCSID specifies the character set that the DRDA database uses to store data.  It is defined when you create your database.  Refer to "Gateway Codepage Map Facility".

Client and Oracle Integrating Server Configuration

A number of NLS parameters control NLS processing between the Oracle server and client.  You can set language-dependent behavior defaults for the server, and you can set language-dependent behavior for the client that overrides these defaults.  For a complete description of NLS parameters, refer to the NLS chapter in the Oracle9i Administrator's Reference.  These parameters do not directly affect gateway processing.  You must, however, ensure that the character set (which is specified by the Oracle server NLS_LANG environment variable) is compatible with the character sets that you specify on the gateway and DRDA server.

When you create your Oracle database, the character set used to store data is specified by the CHARACTER SET parameter.  After the database is created, the database character set cannot be changed unless you re-create the database.

Normally, the default for CHARACTER SET is US7ASCII, which supports only the 26 Latin alphabetic characters.  If you have specified 8-bit character sets on the gateway and DRDA server, then you must have a compatible 8-bit character set defined on your database.  To check the character set of an existing database, issue the command:

SELECT USERENV('LANGUAGE') FROM DUAL;

For more information, refer to "Specifying Character Sets" in the Oracle9i Administrator's Reference.

Note that this does not mean that the gateway character set must be the same as the Oracle server character set.  The Oracle Net facility will be performing implicit conversion between the Oracle server character set and the gateway character set.

Gateway Language Interaction with DRDA Server

During logon of the gateway to the DRDA server, initial language information is exchanged between the Gateway and the server.  First, the Gateway sends to the DRDA server the CCSID it will be conversing in.  In the following example, the Oracle Character Set "WE8ISO8859P1" is mapped to CCSID 819 (an ASCII Code Page).  This CCSID is sent to the DRDA server.  The DRDA server responds with the CCSID that it will be conversing in.  This will be the CCSID with which the DB2 database was generated.  Also, in the following example, this is CCSID 500, an EBCDIC Code Page.  Figure D-2, " Gateway Language Interaction with DRDA Server", illustrates this process.

A DB2 instance will map unknown CCSIDs using the SYSIBM.SYSSTRINGS table (this table has different names for the various DB2 versions).  It is possible to add additional character set mappings to this table using DB2 utilities.  Please refer to the DB2 Installation documentation for details.

The setting of the HS_LANGUAGE parameter in the gateway initsid.ora determines which CCSID is used by the gateway for the conversation.  Refer to "Gateway Codepage Map Facility" for the list of supported ASCII-based Oracle Character Sets mapped to CCSIDs

Note again that the gateway character set need not be the same as the Oracle server character set.  In many cases, it is not feasible to set the gateway character set equal to the Oracle server character set because the DRDA server will not have a valid translation for it.  Instead, choose a character set that will have the most complete intersection with the character set that is used by the DRDA server.  The Oracle Net facility will do any translation between the gateway character set and the Oracle server character set.

Figure D-2 Gateway Language Interaction with DRDA Server

Description of dx2.gif is contained in the surrounding text

Gateway Configuration

After the gateway is installed, you must change several parameters in order to customize for NLS support.

NLS Parameters in the Gateway Initialization File

Three parameters in the Gateway Initialization File (initsid.ora) affect NLS:

  • HS_LANGUAGE

  • HS_NLS_DATE_FORMAT

  • HS_NLS_DATE_LANGUAGE

HS_LANGUAGE

HS_LANGUAGE defines the character set that is used for communication between the gateway and the DRDA server.  It specifies the conventions such as: the language used for messages from the target system; names of days and months; symbols for AD, BC, AM, and PM; and default language sorting mechanism.

The syntax of the HS_LANGUAGE parameter is:

HS_LANGUAGE=language[_territory.character_set]

where:

language can be any valid language.

territory is optional, and defaults to AMERICA.

character_set is optional and defaults to WE8ISO8859P1.  The supported character sets are: US7ASCII, US8PC437, WE8PC850, WE8ISO8859P1, and IW8ISO8859P8.

If you omit the HS_LANGUAGE parameter from initsid.ora, then the default setting is AMERICAN_AMERICA.US7ASCII. EBCDIC character sets are not supported.  The values for language and territory (such as AMERICAN_AMERICA) must be valid, but they have no effect on translations.

HS_NLS_DATE_FORMAT

HS_NLS_DATE_FORMAT specifies the format for dates used by the DRDA server.

The syntax of the NLS_DATE_FORMAT parameter is:

HS_NLS_DATE_FORMAT=date_format

where date_format must be YYYY-MM-DD, the ISO date format.  If this parameter is set to any other value or is omitted, then you receive an error when updating, deleting from, selecting from, or inserting into, a table with date columns.

HS_NLS_DATE_LANGUAGE

HS_NLS_DATE_LANGUAGE specifies the language used by the DRDA server for day and month names, and for date abbreviations.  Because ISO date format contains numbers only, this parameter has no effect on gateway date processing and should be omitted.

Gateway Codepage Map Facility

The gateway now has a user specifiable facility to map IBM Coded Character Set Identifiers (CCSIDs) to Oracle Character Sets for the purpose of data translation.

The map name defaults to "codepage.map" and is located in the directory %ORACLE_HOME%\tg4drda\admin.  Refer to Appendix C, " DRDA-Specific Parameters" for more detailed information about the DRDA_CODEPAGE_MAP parameter.

The syntax of the map is: CCSID direction Oracle_CharacterSet

where:

CCSID is the IBM coded character set identifier

direction is one of the following:

= means mapping is bi-directional

< means mapping is one-way, Oracle character set to CCSID

> means mapping is one-way, CCSID to Oracle character set

Oracle_CharacterSet is the name of a valid Oracle Character Set.

This facility is intended as a way of mapping CCSIDs which were not previously mapped as shipped with the gateway.  You must contact Oracle Support Services before modifying this map.

The following are the contents of the map as shipped with the Oracle Transparent Gateway for IBM DRDA;

# Copyright (c) Oracle Corporation 2002.  All rights reserved.
# Transparent Gateway for IBM DRDA - CodePage/Oracle CharacterSet Map
  37 = WE8EBCDIC37   # United States/Canada
 273 = D8EBCDIC273   # Austria/Germany
 277 = DK8EBCDIC277  # Denmark/Norway
 278 = S8EBCDIC278   # Finland/Sweden
 280 = I8EBCDIC280   # Italy
 284 = WE8EBCDIC284  # Latin America/Spain
 285 = WE8EBCDIC285  # United Kingdom
 297 = F8EBCDIC297   # France
#420 = AR8EBCDICX    # Arabic Bilingual (USA English)
 420 = AR8XBASIC     # Arabic Bilingual (USA English)
 424 = IW8EBCDIC424  # Israel (Hebrew)
 437 = US8PC437      # Personal Computer,USA
 500 = WE8EBCDIC500  # International
 813 = EL8ISO8859P7  # Greek
 819 = WE8ISO8859P1  # ISO/ANSI Multilingual
 838 = TH8TISEBCDIC  # Thai w/Low-Tone Marks & Ancient Chars
 850 < US7ASCII      # Multilingual Page - Personal Computer
 850 = WE8PC850      # Multilingual Page - Personal Computer
 864 = AR8ISO8859P6  # Arabic - Personal Computer
 870 = EE8EBCDIC870  # Latin 2, Multilingual/ROECE
 871 = WE8EBCDIC871  # Iceland - CECP
 875 = EL8EBCDIC875  # Greece
 904 > US7ASCII      # Republic of China (ROC) - Personal Computer
 912 = EE8ISO8859P2  # Latin 2 8-bit
 916 = IW8ISO8859P8  # Israel (Hebrew)
1025 = CL8EBCDIC1025 # Cyrillic, Multiling
1086 = IW8EBCDIC1086 # Israel
1252 = WE8MSWIN1252  # Latin 1 - MS-Windows
1253 = EL8MSWIN1253  # Greek - MS-Windows
#

Refer to the following list to check the character set of an existing database:

Message Availability

Whether a language message module is available depends on which modules are installed in the Oracle product set running on the server.  If message modules for a particular language set are not installed, then specifying that language with a language parameter does not display messages in the requested language.

Example of NLS Configuration

Following is an example of all the settings needed to configure the gateway, DRDA server, Oracle server, and client so that a language and character set are working compatibly across the system.  In this example, the settings allow a customer in Germany to interact with the gateway in German:


Gateway initsid.ora file:
HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1
HS_NLS_DATE_FORMAT=YYYY-MM-DD

DRDA server CCSID:
273 (D8EBCDIC273)

Oracle server and client setting for database:
SELECT USERENV('language') FROM DUAL;
USERENV('LANGUAGE')
-----------------------------
AMERICAN_AMERICA.WE8ISO8859P1

Oracle server and client environment variables:
NLS_LANG=GERMAN_GERMANY.WE8ISO8859P1


Previous Next
Oracle Logo
Copyright © 2001, 2002 Oracle Corporation

All rights reserved
Go To Table Of Contents
Contents
Go To Index
Index