HPlogo MPE/iX Intrinsics Reference Manual > Chapter 8 Command Definitions (HPMERGEEND-LOGSTATUS)

HPMERGEINIT

MPE documents

Complete PDF
Table of Contents
Index

Edition 7 E0701
Edition 7 E0300 ♥
Edition 6 E0195

NM callable only.

Initializes the MERGE/XL subsystem.

Syntax



               I32     I32A        PROC          I32A
  HPMERGEINIT (status, inputfiles, preprocessor, outputfiles,
  
    PROC           I32V      I32V     I32A  CA      PROC
    postprocessor, keysonly, numkeys, keys, altseq, keycompare,
    
    PROC       I32A        I32V     I32A
    errorproc, 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 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:

Value

Meaning

0

Byte type (ASCII or EBCDIC)

1

Twos complement (including 16-bit and 32-bit signed integer)

2

Hewlett-Packard 3000 floating-point format (including real and long)

3

IEEE standard floating-point format (32-bit, 64-bit, and 128-bit values)

4

Packed decimal with odd number of digits

5

Packed decimal with even number of digits

6

Display trailing sign

7

Display leading sign

8

Display trailing sign separate

9

Display leading sign separate

10

Character

11

Reserved for the operating system

12

Short floating-point decimal

13

Floating-point decimal

The fourth element gives the ordering sequence of the records:
Value

Meaning

0

ascending

1

descending


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:

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:

Value

Meaning

1

Number of input files

2

Number of merged records

3

Number of bytes used for the MERGE/XL work area

4

CPU time in milliseconds

5

Elapsed 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

Manual

SORT-MERGE/XL Programmer's Guide




HPMERGEERRORMESS


HPMERGEOUTPUT