Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (F)
Guardian Procedure Calls Reference Manual522629-013
5-114
FILE_OPEN_ Procedure
filenum input, output
INT .EXT:ref:1
returns a number that is used to identify the file in subsequent file-system calls. If
the file cannot be opened, a value of -1 is returned.
filenum is used as an input parameter only when you are attempting a backup
open. In that case, you must supply the
primary-processhandle parameter or
else the input value of
filenum is ignored. For a backup open, filenum must be
the
filenum value that was returned when the file was opened by the primary
process. If a backup open is successful, the input value of
filenum is returned
unless
options.<3> is specified, in which case a new file number is assigned for
the backup open. If the backup open is unsuccessful, -1 is returned.
access input
INT:value
specifies the desired access mode of the file to be opened. (See
“Considerations.”) Valid values are:
0 Read-write
1 Read only
2 Write only
3 Extend (supported only for tape)
The default is 0.
exclusion input
INT:value
specifies the desired mode of compatibility with other openers of the file. (See
“Considerations.”) Valid values are:
0 Shared
1 Exclusive
2 Process exclusive
3Protected
The default is 0.
nowait-depth input
INT:value
specifies whether I/O operations are to be nowait. If present and not 0, this
parameter specifies the number of nowait I/O operations that can be in progress
for the file concurrently with other processing. The maximum value is 1 for disk
files and $RECEIVE. The maximum value is 15 for other objects, except for the
TMF transaction pseudofile (TFILE), which has a maximum of 1000. (Refer to the
TMF Application Programmer’s Guide for details about the TFILE.) If this
parameter is omitted or 0, I/O operations are waited.