HPlogo ALLBASE/ISQL Reference Manual: HP 9000 Computer Systems > Chapter 1 Introduction

Native Language Support

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

ALLBASE/SQL lets you manipulate databases in a wide variety of native languages in addition to the default language, known as n-computer. You can use either 8-bit or 16-bit character data, as appropriate for the language you select. In addition, you can always include ASCII data in any database, because ASCII is a subset of each supported character set. The collating sequence for sorting and comparisons is that of the native language selected. A list of supported languages is in /usr/lib/nls/config.

You can use native language characters in the various ways listed here:

  • As character literals.

  • As host variables for CHAR or VARCHAR data (but not variable names).

  • In ALLBASE/SQL object names.

  • In WHERE and VALUES clauses.

  • In file names.

If your system has the proper message files installed, ALLBASE/SQL displays prompts, messages, and banners in the language you select. It also displays dates and time according to local customs. In addition, you can respond to ISQL prompts in the native language selected. However, regardless of the native language used, the syntax of ISQL and SQL commands--including punctuation--remains in ASCII.

In order to use a native language other than the default, you must do the following:

  1. Make sure your I/O devices support the character set you wish to use.

  2. Set the HP-UX environment variable LANG to the native language (LanguageName) you wish to use. For the C shell, use the following command:

       setenv LANG  LanguageName
    

    For the K shell, use the following command (no spaces before or after the equal sign):

       typeset -x LANG=LanguageName
    

    For the Bourne shell, use the following commands:

       LANG = LanguageName
    
       export LANG
    

    This language then becomes the current language. which determines those message and welcome files used when you invoke ISQL. If LANG is not set, the current language is n-computer.

  3. Use the LANG=LanguageName option of the START DBE NEW command to specify the language when you create a DBEnvironment.

You can use native language characters in the DBEnvironment name. If you do so, you must set the LANG environment variable to the same language before you can connect to the DBEnvironment. To avoid confusion, you are advised to always use the same language for the DBEnvironment that you use in the LANG variable.

Resetting the LANG variable while you are connected to a DBEnvironment has no effect on the current DBE session.

ISQL interacts with two files that contain messages which may vary according to the language selected:

  • hpsqlcat is the ALLBASE/SQL message catalog. This file contains ISQL and other ALLBASE/SQL messages. The full pathname for this file is

       /usr/lib/nls/n-computer/hpsqlcat
    

    If you are using native language data, the pathname is /usr/lib/nls/$LANG/hpsqlcat, where $LANG is the user's current language specified in the setenv command. If this file is not available, then the default file, /usr/lib/nls/n-computer/hpsqlcat, is used.

  • isqlwel is a file containing the ISQL prompt, sign-on banner, and messages to be displayed when you invoke ISQL. The full pathname for this file is:

       /usr/lib/nls/n-computer/isqlwel
    

    If you are using native language data, the path name for this file is /usr/lib/nls/$LANG/isqlwel, where $LANG is the user's current language specified in the setenv command. If this file is not available, then the default file /usr/lib/nls/n-computer/isqlwel is used.

Feedback to webmaster