HPlogo ALLBASE/SQL Pascal Application Programming Guide: HP 9000 Computer Systems > Chapter 1 Getting Started with ALLBASE/SQL Pascal Programming

Native Language Support

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

ALLBASE/SQL lets you manipulate databases in a 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, since 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 following places, including the following places:

  • Character literals.

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

  • ALLBASE/SQL names.

  • WHERE and VALUES clauses.

  • Filenames.

If your system has the proper message files installed, ALLBASE/SQL displays prompts, messages and banners in the language you select, and it displays dates and time according to local customs. In addition, ISQL accepts responses to its 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 syntax:

       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. (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, it is advised that you 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. You must connect to the DBEnvironment again with the new setting.

Feedback to webmaster