Guardian Procedure Calls Reference Manual

Syntax for TAL Programmers
error := FILE_OPEN_ ( { filename | pathname }:length } ! i:i
,filenum ! i,o
,[ access ] ! i
,[ exclusion ] ! i
,[ nowait-depth ] ! i
,[ sync-or-receive-depth ] ! i
,[ options ] ! i
,[ seq-block-buffer-id ] ! i
,[ seq-block-buffer-len ] ! i
,[ primary-processhandle ] ! i
,[ elections ] ); ! i
Parameters
filename:length
input:input
STRING .EXT:ref:*, INT:value
specifies the name of the Guardian file to be opened. The value of filename must be exactly
length bytes long and must be a valid file name or DEFINE name. If the name is partially
qualified, it is resolved using the contents of the =_DEFAULTS DEFINE.
pathname
input
specifies the OSS file to be opened. length is ignored; the pathname parameter is terminated
by a null character. options.<10> must be set to 1 to open an OSS file by its pathname.
See Appendix D: File Names and Process Identifiers, for a description of OSS pathname syntax.
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 General Considerations
(page 461).) Valid values are:
Read-write0
Read only1
Write only2
Extend (supported only for tape)3
The default is 0.
458 Guardian Procedure Calls (F)