Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
SORT-MERGE/XL Programmer's Guide: HP 3000 MPE/iX Computer Systems > Chapter 4 Altering the Collating Sequence

Using a Native Language Sequence

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

When you sort or merge information that has language considerations, you do so by using a collating sequence for Native Language types. These collating sequences include language-specific alphanumeric characters and accent marks.

Parameters in the HPSORTINIT or HPMERGEINIT intrinsic are used when specifying an alternate collating sequence. The parameters are:

  • keys - Data type element must be set to 10 for character data.

  • charseq - a 32-bit integer array. The first element contains the value of 1 (one) and second element contains the language ID of the collating sequence.

NOTE: Use the altseq parameter with ASCII sequences only. Do not use it to create alternate sequences for native language (NL).

Getting the Language ID

To determine the supported languages and their language identification numbers (IDs), use the NLUTIL utility. For example, to sort or merge a German file, run NLUTIL to find the language ID for German:

Figure 4-1 Running NLUTIL

   :RUN NLUTIL.PUB.SYS



   HP32414A.03.00  NLUTIL/3000  (C) HEWLETT-PACKARD CO., 1983



      Lang   Lang                  Char    Char

        ID   Name                    ID    Name

      ----   ----                  ----    ----------------



         0   NATIVE-3000              0    USASCII

         1   AMERICAN                 1    ROMAN8

         2   CANADIAN-FRENCH          1    ROMAN8

         3   DANISH                   1    ROMAN8

         4   DUTCH                    1    ROMAN8

         5   ENGLISH                  1    ROMAN8

         6   FINNISH                  1    ROMAN8

         7   FRENCH                   1    ROMAN8

         8   GERMAN                   1    ROMAN8

         9   ITALIAN                  1    ROMAN8

        10   NORWEGIAN                1    ROMAN8

        11   PORTUGUESE               1    ROMAN8

        12   SPANISH                  1    ROMAN8

        13   SWEDISH                  1    ROMAN8



   Do you require a listing of the current configuration? N

   Do you require a listing of one language? N



   END OF PROGRAM

Specifying Parameters

You then specify the keys and charseq parameters for the HPSORTINIT or HPMERGEINIT intrinsic as follows:

   var

     keys    : array [1..4] of INTEGER;

     charseq : array [1..2] of INTEGER;



     keys[1] := 1;  {key begins}

     keys[2] := 20; {key length}

     keys[3] := 10; {native language character data}

     keys[4] := 1;  {ascending order}



     charseq [1] := 1;

     charseq [1] := 8;  {language ID for GERMAN}

For detailed information about native language sorting and merging, refer to the Native Language Programmer's Guide (32650-90022).

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.