FastSort Manual

Using FastSort Commands
FastSort Manual429834-003
3-15
FROM Command
If you omit the in-file parameter, you can enter only one FROM command for a
sort run, which means the input file is the command stream. If you use a command
file (IN file) for input, put the input records after the RUN command, one record on
each line. If you enter records at the terminal, type the input records after you enter
the RUN command, one record at each ? prompt.
EXCL[USION] mode
specifies the exclusion mode with which FastSort opens a file. For mode you can
specify SHARED, EXCLUSIVE, or PROTECTED.
SHARED
specifies that another process can write to the file while FastSort is reading it.
FastSort reads the file sequentially, so that records inserted at positions
already read are not included in the output file.
If another process is writing to the file while FastSort is reading it, the file
system sometimes returns error 59 (FILE IS BAD). In this case, the input file is
not necessarily corrupted, and you can retry the sort or merge run.
EXCLUSIVE
specifies that only FastSort can access the file.
PROTECTED
specifies that other processes can have only read access to the file. If you
specify PROTECTED, the FROM in-file name cannot be the same as the
TO out-file file name; otherwise, FastSort returns error 49 (INVALID
EXCLUSION MODE SPECIFIED).
These are the default exclusion modes for different devices:
FILE count
specifies the maximum number of records in an input file. When input is from a
source other than disk, FastSort uses count to estimate the space required for the
initial scratch file.
If you omit the FILE parameter, SORTPROG determines the maximum number of
records as follows:
For a structured disk file, SORTPROG estimates the number of records in the
file by looking at the end-of-file location and determining the structured
overhead.
Device Exclusion Mode
Permanent disk files PROTECTED
Temporary disk files and terminals SHARED
Other files (not disk files) EXCLUSIVE