TEMPFILE

Define an intermediate file for output mode

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
TEMPFILE[:temp_spec]

temp_spec

(optional) The file specification for the intermediate file to be used for output. It can have any one of the following formats: (a)

TEMPFILE:"logical:"
TEMPFILE:"file"
TEMPFILE:"logical:file"

The TEMPFILE qualifier defines an intermediate (or temporary) file to be used for opening a file in output mode. The intermediate file’s directory can be specified in the form of a logical name or a directory specification.

If temp_spec is not specified, the intermediate filename is DLnnnnnn, where nnnnnn is six unique characters. The temporary file’s location depends on the operating system:

Operating system

Directory

Windows

The directory specified by the TMP environment variable, the directory specified by the TEMP environment variable, or the current directory

Unix

/tmp/

OpenVMS

SYS$SCRATCH

Make sure sufficient free disk space is available wherever intermediate files are created. Note that TEMPFILE always creates a unique filename if no filename is specified. When the channel is closed, the intermediate file is renamed to the filename specified in the OPEN statement. If this filename is blank, the ­temporary file is not renamed on the CLOSE.

Using the TEMPFILE qualifier instructs Synergy DBL to supersede an existing file on the CLOSE instead of the OPEN.

On OpenVMS, temp_spec is ignored unless it is blank because a new version is used for a new temporary file of the same name. Be careful of directory version limits when using the TEMPFILE qualifier.