FastSort Manual

Using FastSort System Procedures
FastSort Manual429834-003
5-39
SORTMERGESTATISTICS Procedure
flag1 input
INT:value
tells FastSort to use the 22-word array to return statistics if this parameter is
present and set to 1. If flag1 is present but set to 0 or if flag1 is not present,
FastSort uses the 21-word statistics array and converts BUFFER PAGES from an
INT(32) to an INT value before it reaches the array. For BUFFER PAGES, FastSort
returns the value -1 for values greater than 32,767.
Values other than 0 or 1 for flag1 yield error 69 (INVALID STATISTICS FLAG
SPECIFIED).
spare1 reserved
is reserved for future parameters. If you specify a value for spare1, FastSort
returns an error.
The SORTMERGESTATISTICS statistics Structure
SORTMERGESTATISTICS statistics is a 21-word array when the VLM option is
off and a 22-word array when VLM is on. For more information about this option, see
Using VLM on page 9-10.
Table 5-5 on page 5-39 describes the SORTMERGESTATISTICS statistics
structure. The uppercase terms show the equivalent statistics that FastSort returns
after an interactive run.
Table 5-5. SORTMERGESTATISTICS statistics Structure
Word Type Description
0 INT MAX RECORD SIZE: maximum record size in bytes
1 INT or
INT(32)*
BUFFER PAGES: number of 1,024-word pages of extended memory
SORTPROG used as a sort area.
2:3 INT(32) RECORDS: number of records
4:5 INT(32) ELAPSED TIME: total time SORTPROG took to process the sort or
merge request to the nearest hundredth of a second
6:7 INT(32) COMPARES: number of times SORTPROG compared two records
8:9 INT(32) SCRATCH SEEKS: number of blocked read and write operations on
the scratch file
10:11 INT(32) I/O WAIT TIME: the time SORTPROG spent on calls to READ,
WRITE, and AWAITIO, to the nearest hundredth of a second
12:13 INT(32) SCRATCH DISK: number of bytes in the scratch file
14:15 INT(32) INITIAL RUNS: number of runs generated by the first pass
16 INT FIRST MERGE ORDER: number of runs merged in the first
intermediate pass
* If VLM is on, BUFFER PAGES is an INT(32) value and all subsequent words in this array move up one word.