FastSort Manual

Introduction to FastSort
FastSort Manual429834-003
1-9
Scratch Files
Scratch Files
FastSort sorts files smaller than 100 kilobytes in memory. For larger input files,
FastSort uses up to 32 scratch files to temporarily store groups of records called runs.
You can create a scratch file before you run FastSort, or you can have SORTPROG
create one for you. If you manually create a scratch file, SORTPROG leaves the file
intact after the sort or merge run. If SORTPROG creates the scratch file, it is a
temporary file and SORTPROG automatically purges it after the sort completes.
Once an initial scratch file exists, FastSort creates additional scratch files as needed. If
the initial scratch file becomes full, FastSort automatically creates overflow scratch files
until either the sort completes or there are 32 total scratch files. A sort operation
requires scratch space equal to all output records from the SORTPROG process plus
6 bytes per record for overhead. For more information about scratch files, see
Section 9, Optimizing Sort Performance.
Output Files
FastSort can send output to most types of disk files, except EDIT files or
NonStop SQL/MP objects. FastSort can send output to a tape file, but it cannot write
records to blocked tape files. After a sort or merge run, you can use FUP to load a
blocked tape file. For instructions about using FUP, see the File Utility Program (FUP)
Reference Manual. You can also load your output into an EDIT file using the EDIT GET
command. For instructions on how to use the GET command, see Appendix C, Using
Supported File Types.
You can have FastSort compute the size of the output file and then create it, or you
can specify an existing output file. For more information about output files, see
Appendix C, Using Supported File Types.
Using DEFINEs With FastSort
You can use DEFINEs to configure most aspects of a sort or merge operation.
FastSort recognizes class SPOOL and class SORT or SUBSORT DEFINEs. DEFINEs
are optional.
Class SPOOL DEFINE
FastSort allows a class SPOOL DEFINE for the list file (that is, the TACL RUN
command OUT parameter). For example, the following implicit TACL RUN command
specifies a SPOOL DEFINE named =out_file for the FastSort list file. The TACL
ADD DEFINE command first creates the SPOOL DEFINE and sets the LOC attribute.
ADD DEFINE =out_file, CLASS SPOOL, LOC \ny.$s.#sort
...
SORT / OUT =out_file /
...
For more information about class SPOOL DEFINEs, see Guardian User’s Guide.