FastSort Manual

Using FastSort System Procedures
FastSort Manual429834-003
5-4
SORTBUILDPARM Procedure
is the address of a buffer that SORTPROG can use to block input records from
SORTMERGESEND or deblock output records for SORTMERGERECEIVE. This
buffer can be in the user data space segment (for buffer length up to 8 KB) or in an
extended data segment. If the buffer is in an extended data segment, the segment
must be in use at the time of the call. You should not rely on the information in
buffer, because this information can change without warning.
For double buffering, you can also specify the buffer2 parameter.
If you specify buffer, you must specify the length of buffer in the
buffer-length parameter.
buffer2 input
INT(32):value
is the address of a second buffer that SORTPROG can use to block input records
from SORTMERGESEND and output records for SORTMERGERECEIVE. Like
buffer, buffer2 can be in the user data space segment (for buffer length up to 8
KB) or in an extended data segment. If the buffer is in an extended data segment,
the segment must be in use at the time of the call. Also, if you specify both buffers
in an extended data segment, they must be in the same segment. You should not
rely on the information in buffer2, because this information can change without
warning.
If you specify buffer2, you must specify the buffer and buffer-length
parameters. Both buffers have the length buffer-length.
Record blocking is valid only for sort runs. If you try to use record blocking with
merge runs, SORTPROG returns error 81 (BLOCKED INTERFACE NOT
ALLOWED WITH MERGE).
buffer-length input
INT:value
is the length, in bytes, of buffer and of buffer2 (if specified). The length can
range from 4 KB to 32 KB.
build-flags input
INT:value
is limited to the build-flags.<15> bit, which specifies the same restart option as
the SORTMERGESTART restart flag (flags.<15>). For more information on
description of flags.<15> bit, see Table 5-4
on page 5-32.
Other build-flags bits are not used and should be set to 0.
To preserve SORTBUILDPARM parameters in the sort control block when you use
the restart option, call SORTBUILDPARM with build-flags.<15> set to 1 before
you call SORTMERGESTART with flags.<15> set to 1. Before your process can