FastSort Manual

Sorting in Parallel
FastSort Manual429834-003
6-3
Using Procedures for Parallel Sorting
5. If you want to specify a group of processors for running subsort processes, list the
processors SORTPROG can use in a CPUS command. Specify any processors
SORTPROG cannot use in a NOTCPUS command. For more information, see
Selecting Processors to Run Subsort Processes on page 6-7.
6. Set up the distributor-collector process in the RUN command that starts the parallel
sort operation. For more information, see Using the Automatic Configuration on
page 6-4 and Configuring a Distributor-Collector Process on page 6-10.
The following commands start a distributor-collector process in the same processor
(CPU) in which the SORT process is running and a subsort process in each of the
three processors that control the disk volumes $VENUS, $MARS, and $SATURN. The
volume names in the SUBSORT commands specify volumes for the temporary scratch
files on $VENUS, $MARS, and $SATURN.
FROM LASTNAME
TO ZIPCODE
ASC 76:80, 1:15 UPPER
SUBSORT $VENUS
SUBSORT $MARS
SUBSORT $SATURN
RUN
FastSort tries to put each subsort process in the same processor as the primary disk
process for the scratch volume. For the interactive interface, the default processor for
the distributor-collector process is the same processor in which the SORT process is
running.
Using Procedures for Parallel Sorting
To set up a parallel sort run by using FastSort procedures, call the procedures from
your program in this order:
1. SORTBUILDPARM stores parameters for parallel sorting in the sort control block,
including the numbers of the processors in which to run subsort processes. For
more information, see Configuring Subsort Processes on page 6-6.
2. SORTMERGESTART begins the distributor-collector process and passes
parameters to it for the sort run, including key fields for sorting, names of input and
output files, and information about the subsort processes. For more information,
see Configuring Subsort Processes
on page 6-6 and Configuring a Distributor-
Collector Process on page 6-10.
3. SORTERRORSUM returns detailed information about an error to your process,
which should call this procedure only if an error occurs.
4. SORTMERGESTATISTICS ends the sort run and returns information to your
process about the data sorted, the sorting and merging operations, and resource
usage.