Using KSAM/XL and KSAM 64 (32650-90886)

74 Chapter9
KSAM Intrinsics
FCLOSE
FCLOSE
Terminates access to a file on any device.
Syntax
I16V I16V I16V
FCLOSE(
filenum,disposition,securitycode
);
Parameters
filenum
16-bit signed integer by value (required)
Passes the file number of the file to be closed.
disposition
16-bit signed integer by value (required)
Passes the disposition of the file, significant only for files on disk and
magnetic tape.
NOTE
This
disposition
can be overridden by a corresponding parameter in a FILE
command entered prior to program execution.
The
disposition
options are:
Bits Value/Meaning
13:3 Domain disposition:
000
No change. The
disposition
remains as it was before
the file was opened. If the file is new, it is deleted by
FCLOSE; otherwise, the file is assigned to the domain it
belonged to previously. An unlabeled tape file is rewound
and a labeled tape is rewound and unloaded.
001
Close as a permanent file. If the file is a disk file, it is
saved in the system file domain. A new or old temporary
file on disk has an entry created for it in the system file
directory. If a file of the same name already exists in the
directory, an error code is returned and the file remains
open. If the file is a permanent file on disk, this domain
disposition has no effect.
010
Close as a temporary job file (rewound). The file is
retained in your temporary (job/session) file domain and
can be requested by any process within your job/session. If