Guardian Procedure Calls Reference Manual

and that filenum is the number returned by the file system to identify the open file. In this
case, OPENEDIT_ only verifies that the file is an EDIT file and creates the internal data structures
necessary for subsequent IOEdit operations on the file. If filenum is a negative value or if
the file does not exist, OPENEDIT_ opens the file by calling FILE_OPEN_ (after calling
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. These 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.
For a detailed description of this parameter, see the access parameter under FILE_OPEN_
Procedure (page 457) .
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).
For a detailed description of this parameter, see the exclusion parameter under FILE_OPEN_
Procedure (page 457).
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).
For a detailed description of this parameter, see the nowait-depth parameter under
FILE_OPEN_ Procedure (page 457).
For a description of how opening a file for nowait access affects an edit file, see Nowait
Considerations (page 577) .
918 Guardian Procedure Calls (O)