Oracle Transparent Gateway for IBM DRDA Installation and User's Guide
Release 9.0.1.0.1 for Sun Solaris

Part Number A90399-01
Go To Documentation Library
Library
Go To Product List
Product
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

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.

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, Oracle 9i 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 Table D-1.

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


Text description of apd1.gif follows
Text description of the illustration apd1.gif

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

Table D-1  Parameters Needed for NLS Processing in Your System's Environments
Environment  Parameter or Variable  Description 

Client 

NLS_LANG 

An environmental variable. NLS_LANG sets the NLS environment 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 Integrating Oracle Server Configuration" for detailed information. 

Integrating Oracle Server 

CHARACTER SET 

This option is set during creation of the database. CHARACTER SET determines the character encoding scheme used by the database and 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 Integrating Oracle 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 used for communication between the gateway and the integrating Oracle 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 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 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 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 Integrating Oracle Server Configuration

There are a number of NLS parameters that 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 Oracle9i Server Reference. These parameters do not directly affect gateway processing. However, you must ensure that the character set (specified by the Oracle server NLS_LANG environment variable) is compatible with the character sets 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. Once 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 Server Reference.

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 it will be conversing in. This will be the CCSID that the DB2 database was generated with. 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 gateways 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.

Figure D-2 Gateway Language Interaction with DRDA Server


Text description of apd0.gif follows
Text description of the illustration apd0.gif

Gateway Configuration

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

NLS Parameters in the Gateway Initialization File

There are three parameters in the Gateway Initialization File, initsid.ora, that affect NLS:

HS_LANGUAGE

LANGUAGE defines the character set 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 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, and WE8ISO8859P1, 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.

NLS Parameters in the Gateway Startup Shell Script

Two parameters that affect NLS support are in the gateway Startup Shell Script:

ORA_NLS33

ORA_NLS33 specifies the directory where the gateway loads its character sets and other language data, $ORACLE_HOME/ocommon/nls/admin/data. The ORA_NLS33 parameter must be specified as follows:

ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data; EXPORT ORA_NLS33

If you omit the ORA_NLS33 parameter, then the language, territory, and character set default to AMERICAN_AMERICA.US7ASCII, even if you have set NLS_LANG to some other value.

NLS_LANG

NLS_LANG defines the character set that is used for communication between the gateway and the Oracle server. The syntax of the NLS_LANG parameter is:

NLS_LANG=language[_territory.character_set];EXPORT NLS_LANG

where:

language must match the language specified in the HS_LANGUAGE parameter of initsid.ora.

territory must match the language specified in the HS_LANGUAGE parameter of initsid.ora.

character_set is optional, and defaults to AMERICA. If you specify territory, then it must match the territory specified in the HS_LANGUAGE parameter of initsid.ora.

If you omit the NLS_LANG parameter, then the default setting is AMERICAN_AMERICA.US7ASCII.

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:

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.

Following is the contents of the map as shipped with the Oracle Transparent Gateway for IBM DRDA;

# Copyright (c) Oracle Corporation 2001.  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


Go to previous page Go to next page
Oracle
Copyright © 2001 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Library
Go To Product List
Product
Go To Table Of Contents
Contents
Go To Index
Index