FastSort Manual

Using FastSort System Procedures
FastSort Manual429834-003
5-16
SORTMERGESEND Procedure
status returned value
INT
returns a FastSort error code if an error occurred; if not, returns 0.
ctlblock input
INT:ref:200
is the same global storage array you name in the call to SORTMERGESTART. You
should not rely on the information in ctlblock, because this information can
change without warning.
record-loc input
INT:ref:*
is the memory location of an input record. You must specify record-loc or
record-loc-ext, but you cannot specify both. record-loc-ext must be used
instead of record-loc for records of size greater than 4072 bytes.
length input
INT:value
is the length, in bytes, of the input record. The length can vary for input records for
a sort or merge run. The length can be no smaller than the offset from the start of a
record to the first character of the rightmost key and no larger than the longest
input record length you specify in the in-file-record-length parameter of the
SORTMERGESTART procedure.
After sending the last record for a sort run, call SORTMERGESEND with length
set to –1, which indicates to SORTPROG that your process has sent all the
records for the run.
After sending the last record from an input stream for a merge run, call
SORTMERGESEND with length set to –1 for the stream, which indicates to
SORTPROG that your process has sent all the records from the input stream.
stream-id output
INT:ref:1
receives the number of the input stream from which SORTMERGESEND should
get the next record for merging. When all input streams have no more records,
SORTMERGESEND sets stream-id to –1 to indicate that all input was sent.
You must specify this parameter if you specify more than one merge file in the call
to SORTMERGESTART and if in-file-name equals all blanks.