MPE/iX Intrinsics Reference Manual (32650-90875)
120 Chapter4
Command Definitions (ABORTSESS - FCLOSE)
FCLOSE
the saved
disposition
is the smallest nonzero
disposition
parameter
specified for all FCLOSE calls issued against the file.
For example, the file XYZ is opened three successive times by a process. The
first FCLOSE
disposition
is 1, the second is 2, and third is 3. On the last
FCLOSE, a
disposition
of 1 will occur.
The disposition can also be effected by file equations and HPFOPEN item 50
Multiple access is NOT required to have a problem here as you can do a file
equation, HPFOPEN and FCLOSE with one user, one time and the
disposition is the “lowest” of all specified.
securitycode
16-bit signed integer by value (required)
Returns the type of security initially applied to the file (significant for new
permanent files only). The valid options are:
Value Meaning
0
Unrestricted access; can be accessed by any user, unless
prohibited
1 Private file creator security; can be accessed only by the creator
The
securitycode
parameter selects the security mask assigned to new
permanent files whether or not the file is within an MPE group.
(ASC) This parameter is not meaningful for asynchronous devices.
Operation Notes
FCLOSE deletes buffers and control blocks where the process accessed the file. It also
deallocates the device where the file resides, and it can change the
disposition
of the file.
If FCLOSE calls are not issued for all files opened by the process, the calls are issued
automatically by the operating system when the process terminates. All magnetic tape
files are left offline after FCLOSE calls, to indicate that the system operator can remove
them.
For circular files, deletion of disk space beyond the end of file is not allowed. Such a request
is not an error but no operation is performed. For RIO files, cutback disposition works the
same as for flat files: if you have any access to the file other than read and you call FCLOSE
with disp=%10, the file is closed, the space beyond the EOF is returned to the system, the
file's limit is changed to EOF, and no error is returned.
The FCLOSE intrinsic can be used to maintain position when creating or reading a labeled
tape file that is part of a volume set:
• If the file is closed with a
disposition
code of 3, the tape does not rewind but remains
positioned at the next file.
• If the file is closed with a
disposition
code of 2, the tape rewinds to the beginning of
the file, but is not unloaded.
• A subsequent request to open the file does not reposition if the sequence (
seq
)
subparameter of
formmsg
in FOPEN/HPFOPEN specifies NEXT or the default (1).