FastSort Manual

Using FastSort System Procedures
FastSort Manual429834-003
5-26
SORTMERGESTART Procedure
receives a completion code of 0 if no error occurred or receives error codes if an
error occurred. The high-order word has the file-system or NEWPROCESS error
code. The low-order byte of the low-order word has the FastSort error code:
You can use SORTERRORSUM to supply the text of the FastSort error message
and to get the index of the input file in the in-file-name array.
SORTERRORSUM also identifies the output file, scratch file, or SORTPROG
process that caused an error.
errproc input
is a procedure that FastSort can call when an error occurs. For more information,
see Writing a User Error Procedure on page 5-37.
scratch-file-name input
INT:ref:12
INT:ref:*
is a 12-word name for an initial scratch file or an array with a file name for each
subsort scratch file. You can name only a scratch volume in the first 8 bytes and
leave the remaining bytes blank. If you specify an existing file, it must be
unstructured.
If you specify subsort-count, the size of the scratch-file-name array is the
value of subsort-count + 1. The first file name is a scratch file for the distributor-
collector process, and each additional file name is an initial scratch file for a
subsort process, as in this example:
INT DIST^SCRATCH[0:11] := [" "];
INT SUB1^SCRATCH[0:11] := ["$DATA1 "];
INT SUB2^SCRATCH[0:11] := ["$DATA2 "];
Note. FastSort saves the address of errnum in its control block. If an error occurs for calls to
SORTMERGESEND, SORTMERGERECEIVE, SORTMERGEFINISH,
SORTMERGESTATISTICS, or SORTMERGESTART, FastSort returns an error to this address.
A user procedure that calls these procedures can access errnum. However, HP recommends
that you call SORTERRORDETAIL rather than use the errnum parameter to get error
information.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Parameter Word
High-Order
Low-Order
Bits
File-System or NEWPROCESS[NOWAIT] Error Code
FastSort Input File Index
FastSort Error Code
VST503.vsd