FastSort Manual

Using FastSort Commands
FastSort Manual429834-003
3-31
TO Command
4. If none of the above conditions exists, SORTPROG creates an entry-sequenced
file.
You can use a process as an output file.
If out-file is a blocked tape file, SORTPROG writes only one record for each block.
You can use the File Utility Program (FUP) to block the records and load the tape file.
For information about FUP, see the FUP Reference Manual.
SORTPROG does not write output records to EDIT files.
Key-sequenced files with increased limits cannot be used as an output file. For more
information about key-sequenced files with increased limits, see Enscribe
Programmer’s Guide.
The output file type can be key-sequenced. For key-sequenced files, the following
rules apply:
You can use only one sort key field, and the data type for the field must be
UNSIGNED.
The sort key field must be the same as the file’s primary key field.
You must specify the field in an ASCENDING command.
You can specify the data slack and index slack for a new or existing key-sequenced
output file.
Existing Output Files
If out-file exists on a disk prior to the sort or merge run, FastSort purges all the
data in the file before reusing the file. For FastSort to reuse an existing disk file as an
output file, all of the following must be true:
The existing file type must be the same as the output file type in effect for the run.
The existing file size must be equal to or greater than the sum of all the input file
sizes, except when you specify the NOPURGE parameter.
The maximum record length for the existing file must be equal to or greater than
the maximum output record length for the run.
If any of these required conditions does not exist, FastSort purges the existing output
file and creates a new file. If you do not want FastSort to purge and recreate the file,
specify the NOPURGE parameter in the TO command.
Caution. If you specify the same file as both an input file and output file for a sort run, you can
lose all the data from the input file if an error or processor failure ends the SORTPROG
process.