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

HPSORTEND

MPE documents

Complete PDF
Table of Contents
Index

Edition 7 E0701
Edition 7 E0300 ♥
Edition 6 E0195

NM callable only.

Releases the SORT/XL work area and ends the sorting operation.

Syntax



             I32     I32A
  HPSORTEND (status, statistics);


NOTE: HPSORTEND must be called to terminate SORT/XL and release the work space.

Parameters


status

32-bit signed integer by reference (optional)

Returns the status of the HPSORTEND 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 HPSORTEND is 195.

statistics

32-bit signed integer array (optional)

Returns SORT/XL operation information:

Value

Meaning

1

Number of records sorted

2

Number of intermediate passes

3

Number of bytes used for the Hewlett-Packard SORT program work area

4

Number of compares

5

CPU time used in milliseconds

6

Elapsed time in milliseconds


NOTE: The statistics array should be the same array that was passed to the HPSORTINIT intrinsic. It must be referenced by the same name.

Operation Notes


HPSORTEND initiates the merge phase of the Hewlett-Packard SORT program and writes to the output file if the HPSORTOUTPUT intrinsic is not used. HPSORTEND is required if you called HPSORTINIT. Call HPSORTEND either after all calls to the output file are completed by the HPSORTINIT intrinsic, or after all calls to the HPSORTOUTPUT intrinsic are completed. HPSORTEND must be called in the same process as the HPSORTINIT intrinsic.

Related Information


Intrinsics

HPSORT, HPMERGE

Manual

SORT-MERGE/XL Programmer's Guide




HPSETDUMP


HPSORTERRORMESS