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

60 Chapter5
Getting SORT-MERGE/XL Information
Getting Statistical Information
:RUN SORTPROG;STDLIST = OUTFILE
:END OF PROGRAM
You may also redirect $STDLIST to a back-referenced file or to $NULL.
Getting Statistical Information
For comparison or other purposes, SORT-MERGE/XL allows you to report statistical
information. The statistical information provided by SORT-MERGE/XL includes:
Number of input files (MERGE/XL only)
Number of records sorted (or merged)
Number of intermediate passes (SORT/XL only)
Number of bytes used for the sort work area
Number of comparisons (SORT/XL only)
Amount of CPU time used (in milliseconds)
Elapsed time (in milliseconds)
NOTE
If SORT-MERGE/XL aborts, the values returned in
statistics
and printed
out by HPSORTSTAT and HPMERGESTAT are unpredictable.
Syntax for HPSORTSTAT and HPMERGESTAT is:
HPSORTSTAT (
status
,
statistics
);
HPMERGESTAT (
status
,
statistics
);
HPSORTSTAT and HPMERGESTAT print the
statistics
array to $STDLIST.
An example of using HPSORTSTAT follows:
var
status : INTEGER;
statistics : array [1..6] of INTEGER;
.
.
.
HPSORTSTAT (status, statistics);
The intrinsics and parameters required to get statistical information are:
HPSORTINIT or HPMERGEINIT - statistics parameter must be specified.
HPSORTEND or HPMERGEEND - statistics parameter must be specified.
HPSORTSTAT or HPMERGESTAT must be called after HPSORTEND or HPMERGEEND.