FastSort Manual

Using FastSort System Procedures
FastSort Manual429834-003
5-22
SORTMERGESTART Procedure
If you omit in-file-name or if it equals all blanks, your process must call
SORTMERGESEND to send each input record to SORTPROG.
SORTMERGESEND cannot send both sorted and unsorted records for the same
sort run. For more information, see SORTMERGESEND Procedure on page 5-15.
You can specify the same file in both in-file-name and out-file-name for a
sort run but not for a merge run.
in-file-exclusion-mode input
INT:ref:*
is an array including a one-word entry for each input file. Each entry contains the
exclusion mode SORTPROG uses when it opens the corresponding input file. If
you specify an exclusion mode for one input file, you must specify a mode for each
input file for a sort or merge run. Use one of the following values to specify the
exclusion mode:
For SHARED access, if another process is writing to the input file while FastSort is
reading it, the operating system might return file-system error 59 (FILE IS BAD).
However, the file is not necessarily corrupted. Retry the sort or merge run.
If you specify PROTECTED for the in-file-exclusion-mode parameter, the
in-file-name parameter cannot specify the same file name as the
out-file-name parameter; otherwise, SORTPROG returns sort error 49
(INVALID EXCLUSION MODE SPECIFIED).
If you specify –1 or omit this parameter, these default exclusion modes apply:
If you want your process to read the input file at the same time as SORTPROG,
specify PROTECTED exclusion mode for SORTPROG and use SHARED
exclusion mode when your process opens the file.
Caution. If you specify the same file as both an input file and the output file for a sort run, you
can lose all the data from the input file if an error or processor failure terminates the
SORTPROG process.
Value Exclusion Mode
–1 Use the default mode
0 SHARED
1 EXCLUSIVE
2 PROTECTED
Device Exclusion Mode
Permanent disk file PROTECTED
Temporary disk file SHARED
Terminal SHARED
Other EXCLUSIVE