HPlogo 900 Series HP 3000 Computer Systems: MPE/iX Intrinsics Reference Manual > Chapter 4 Command Definitions

HPMERGEINIT

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

NM callable only.

Initializes the MERGE/XL subsystem.

Syntax

                I32   I32A      PROC      I32A

   HPMERGEINIT(status,inputfiles,preprocessor,outputfiles,

                   PROC     32V     I32V

               postprocessor,keysonly,numkeys,

               I32A CA     PROC      PROC

               keys,altseq,keycompare,errorproc,

                 I32A    I32V    I32A

               statistics,memsize,charseq);

Parameters

status

32-bit signed integer by reference (optional)

Returns the status of the HPMERGEINIT call. If no errors or warnings are encountered, status returns 32 bits of zero. If errors or warnings are encountered, status is interpreted as two 16-bit fields.

Bits (0:16) comprise status.info. A negative value indicates an error condition, and a positive value indicates a warning condition. Refer to the MPE/iX Error Message Manual Volumes 1, 2 and 3 (32650-90066, 32650-90152, and 32650-90368) for a description of its value.

Bits (16:16) comprise status.subsys. The value represented by these bits defines the subsystem that set the status information. The subsystem identifier for HPMERGEINIT is 196.

inputfiles

32-bit signed integer array (optional)

Passes the file identification numbers of the input files to be merged. The last element of this array should be set to zero. If the files are opened with either the NOBUF or MR (multirecord) access option, MERGE/XL program performs the buffering and blocking/deblocking.

preprocessor

procedure (reserved)

Do not specify this parameter, but maintain parameter position.

outputfiles

32-bit signed integer array (optional)

Passes the file identification number of the output file in the first array element. If the file is opened with either the NOBUF or MR (multirecord) access option (aoption), MERGE/XL performs the buffering and blocking/deblocking.

If you do not specify this parameter, you must call the HPMERGEOUTPUT intrinsic to retrieve merged records.

postprocessor

procedure (reserved)

Do not specify this parameter, but maintain parameter position.

keysonly

32-bit signed integer by value (optional)

Flag that determines if only keys are sent as output. If set to 0, the entire record is sent as output. If set to any value other than 0, the key fields are concatenated together with he major key on the left and the remaining keys following. Default: 0

numkeys

32-bit signed integer (optional)

Number of keys used during the comparison of records. This parameter can be either equal to or greater than one. If you specify the numkeys parameter, you must also specify the keys parameter. Together, numkeys and keys describe the way records are merged.

keys

32-bit signed integer array (optional)

Passes information about the keys used during the comparison of records. If you specify the keys parameter, you must specify the numkeys parameter. Together, keys and numkeys describe the way records are merged.

For each key, there are four entries in the array.

The first element gives the position of the first byte of the key within the input record. The second element gives the number of bytes in the key. The third element indicates the type of data:

ValueMeaning
0Byte type (ASCII or EBCDIC)
1Twos complement (including 16-bit and 32-bit signed integer)
2Hewlett-Packard 3000 floating-point format (including real and long)
3IEEE standard floating-point format (32-bit, 64-bit, and 128-bit values)
4Packed decimal with odd number of digits
5Packed decimal with even number of digits
6Display trailing sign
7Display leading sign
8Display trailing sign separate
9Display leading sign separate
10Character
11Reserved for the operating system
12Short floating-point decimal
13Floating-point decimal

The fourth element gives the ordering sequence of the records:

ValueMeaning
0ascending
1descending

NOTE: The integrity of the keys array must be maintained throughout the MERGE/XL operation. Do not change it until after you have called the HPMERGEEND intrinsic.
altseq

character array (optional)

Passes an alternate collating sequence. The first element is specified according to the following table, where the sequence comprises the columns and the data comprises the rows:

excess space above nonumber table—>

 ASCIIEBCDICALTSEQ
ASCIIchr(255)chr(2)chr(0)
EBCDICchr(1)chr(255)undefined

The second element specifies one fewer than the total number of characters in the collating sequence.

If the first element is CHR(0), the remaining array elements comprise the actual collating sequence responsible for the particular MERGE/XL operation.

The defaults are: element 1 = CHR(255), element 2 = CHR(255)

keycompare

procedure (reserved)

Do not specify, but maintain parameter position.

errorproc

procedure (reserved)

Do not specify, but maintain parameter position.

statistics

32-bit signed integer array (optional)

Returns information on the MERGE/XL operation:

ValueMeaning
1Number of input files
2Number of merged records
3Number of bytes used for the MERGE/XL work area
4CPU time in milliseconds
5Elapsed time in milliseconds

memsize

32-bit signed integer by value (reserved)

Do not specify, but maintain parameter position.

charseq

32-bit signed integer array (optional)

Passes language information. Set the first element to 1 and the second element to the language ID of the native language collating sequence to be used for keys of type character (keys parameter equal to 10).

Related Information

Intrinsics

Hewlett-Packard SORT, Hewlett-Packard MERGE

Commands

None

Manuals

SORT-MERGE/XL Programmer's Guide (32650-90080)

Feedback to webmaster