Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (O)
Guardian Procedure Calls Reference Manual—522629-013
11-21
OPEN Procedure (Superseded by FILE_OPEN_
Procedure )
If there are no parameter or data space allocation errors, the filenum parameter
is valid when OPEN returns. However, no I/O operation on the file can be initiated
until the open is completed, and other errors are reported by a call to AWAITIO.
If the
tag parameter is specified in the call to AWAITIO, a -30D returns. The
values returned in the buffer and count parameters to AWAITIO are undefined. If
an error returns from AWAITIO, it is the user’s responsibility to close the file.
For a nonprocess or waited (nowait depth = 0) file,
flags.<8> is internally reset to
0 and ignored. A call to FILEINFO after the call to OPEN can return the value of
the internal flags; if bit <8> = 1, then a call to AWAITIO must be performed to
complete the open.
Refer to the
Enscribe Programmer’s Guide for considerations when using nowait
I/O. Refer to the
Guardian Programmer’s Guide for a general discussion of nowait
I/O.
•
Direct and buffered I/O transfers
A file opened by OPEN uses an intermediate buffer in the process file segment
(PFS) for I/O (read) transfers by default; SETMODE 72 is used to force the system
to use direct I/O transfers. This is unlike FILE_OPEN_ , which uses direct I/O
transfers by default.
•
Partitioned files
A separate pair of FCBs exist for each partition of a partitioned file. There is one
ACB per accessor (as for single-volume files), but this ACB requires more main
memory since it contains the information necessary to access all of the partitions,
including the location, alternate keys, and partial-key value for each partition.
•
Disk file open—security check
When a disk file open is attempted, the system performs a security check. The
accessor’s (that is, the caller’s) security level is checked against the file security
level for the requested access mode, as follows:
for read access: read security level is checked.
for write access: write security level is checked.
for read-write access: read and write security levels are checked.
A file has one of seven levels of security for each access mode. (The owner of the
file can set the security level for each access mode by using SETMODE function 1
or by using the File Utility Program SECURE command.) Table 11-3
shows the
seven levels of security.