Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (O)
Guardian Procedure Calls Reference Manual—522629-013
11-44
OPENEDIT_ Procedure
FILE_CREATE_, if necessary), and then creates the internal IOEdit data
structures.
On return, if OPENEDIT_ called FILE_OPEN_, the returned value is the number
returned by FILE_OPEN_ to identify the open file. If OPENEDIT_ did not call
FILE_OPEN_, the input value of
filenum is returned unchanged.
access input
INT:value
specifies the value that is passed to the
access parameter of the FILE_OPEN_
procedure if OPENEDIT_ opens the file. The following conditions apply:
•
If OPENEDIT_ opens the file and if the access parameter is omitted, 1 is used
(indicating read-only access).
•
If OPENEDIT_ opens the file and if the access parameter is equal to 2
(indicating write-only access), OPENEDIT_ opens the file with read-write
access instead, because any write to an EDIT file requires reading a directory
within the file to determine where to write the line.
•
If the file is already open with write-only access at the time of the call to
OPENEDIT_, the procedure returns an error 2 (invalid operation), because it is
unable to change the file’s access mode.
•
If the file does not exist and if the access parameter is omitted or equal to 1
(indicating read-only access), OPENEDIT_ returns error 11 (file does not exist).
If the file does not exist and if the
access parameter is equal to 0 (indicating
read-write access), OPENEDIT_ creates the file and opens it.
Refer to the
access parameter under the FILE_OPEN_ procedure for a detailed
description of this parameter.
exclusion input
INT:value
specifies the value that is passed to the
exclusion parameter of the
FILE_OPEN_ procedure if OPENEDIT_ opens the file. If this parameter is omitted,
0 is used (indicating shared access).
Refer to the
exclusion parameter under the FILE_OPEN_ procedure for a
detailed description of this parameter.
nowait input
INT:value
specifies the value that is passed to the
nowait-depth parameter of the
FILE_OPEN_ procedure if OPENEDIT_ opens the file. If this parameter is omitted,
1 is used (indicating that a maximum of one nowait I/O operation can be in
progress at any time for this file).