HPlogo SORT-MERGE/XL Programmer's Guide > Chapter 5 Getting SORT-MERGE/XL Information

Getting Statistical Information

MPE documents

Complete PDF
Table of Contents
Index

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.




Redirecting Output


Example of Getting Sort/Merge Statistics