FastSort Manual

Sorting Programmatically
FastSort Manual429834-003
4-2
Starting a Sort or Merge Run
Starting a Sort or Merge Run
Use the SORTMERGESTART procedure to start a SORTPROG process and specify
parameters for a sort or merge run. SORTMERGESTART contains most of the
necessary parameters for the sort or merge run, including:
One or more input files
An output file for sorting or merging, or both
One or more key fields
Removal of records that have duplicate key values
The name of an initial scratch file and a block size for scratch file I/O
Subsort processes for parallel sorting
Parameters for running the SORTPROG process
You can use the SORTMERGESTART restart option to limit new process creation for
each sort or merge run, and to reuse a scratch file in successive runs.
Ending a Sort or Merge Run
To end a sort or merge run, use either the SORTMERGESTATISTICS or
SORTMERGEFINISH procedure. SORTMERGEFINISH also stops the SORTPROG
process, but SORTMERGESTATISTICS does not.
Specifying Record Blocking and Parallel Sorting
Use the SORTBUILDPARM procedure to specify record blocking, parallel sorting, and
overflow scratch volumes. The SORTBUILDPARM procedure specifies the following:
A buffer for record blocking to reduce interprocess messages when you use
SORTMERGESEND or SORTMERGERECEIVE (not valid for a merge run)
Processors (CPUs) or the restart option for subsort processes in parallel sorting
Volumes to either include or exclude from overflow scratch files
SORTERRORSUM Provides SORTERROR and SORTERRORDETAIL
information and identifies the cause of the most recent error.
SORTMERGESTATISTICS Reports information about a sort or merge run and ends the
run.
SORTMERGEFINISH Ends the sort or merge run and stops the SORTPROG
process.
Table 4-1. FastSort System Procedures (page 2 of 2)
Procedure Name Description