COBOL Manual for TNS and TNS/R Programs

Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs522555-006
9-125
MERGE
How the Scratch File Is Determined
°
If COBOL_SET_SORT_PARAM_TEXT_ specifies a SCRATCH-FILE, then that
file is the scratch file.
°
If the SELECT statement associated with merge-file specifies the
=_SORT_DEFAULTS DEFINE as the define-name-literal, then:
°
If the =_SORT_DEFAULTS DEFINE exists and specifies a scratch file, then
that file is the scratch file.
°
If the =_SORT_DEFAULTS DEFINE exists but does not specify a scratch file,
then a temporary file on the volume $SYSTEM is the scratch file.
°
If no =_SORT_DEFAULTS DEFINE exists, then a temporary file on the volume
$SYSTEM is the scratch file.
°
For more information on the =_SORT_DEFAULTS DEFINE, see Establishing
Parameters With =_SORT_DEFAULTS DEFINE.
°
If the SELECT statement associated with merge-file does not specify the
=_SORT_DEFAULTS DEFINE as the define-name-literal, then the file
that the SELECT statement specifies is the scratch file.
How the Volume of the Swap File Is Determined
The operating system assigns a swap file to swap pages in and out of memory
while the compiler is running. The swap file mirrors all of the data areas that the
compiler uses. The ideal swap file is a fast device that is neither busy nor mirrored.
To redirect the swap file, give define-name-literal the value
=_SORT_DEFAULTS.
The swap file is a temporary file with a volume but no subvolume. If you specify a
swap file, including a volume, the volume is used but the file-id is not. If you
specify only a file-id, the default volume is used.
°
If COBOL_SET_SORT_PARAM_TEXT_ specifies a SWAP-FILE, then the
swap file is created on that file’s volume.
°
If the SELECT statement associated with merge-file specifies the
=_SORT_DEFAULTS DEFINE as the define-name-literal, then:
°
If the =_SORT_DEFAULTS DEFINE exists and specifies a swap file, then
the swap file is created on that file’s volume.
°
If the =_SORT_DEFAULTS DEFINE exists but does not specify a swap
file, then the swap file is created on the volume used for the scratch file.
Note. If a scratch file is specified but its value is all spaces, assume that no scratch file
was specified.
Note. If a swap file is specified but its value is all spaces, assume that no swap file was
specified.