Guardian Procedure Calls Reference Manual

Considerations
The caller must set the filenum parameter to an appropriate value before each call to
OPENEDIT_, because its value might be changed upon return.
If the file is already open at the time of the call to OPENEDIT_, the access, exclusion,
nowait, sync-depth, and write-thru parameters to OPENEDIT_ are ignored.
OPENEDIT_ sets the file's current record number to -1 and resets the line number increment
to 1 (that is, it resets the record number increment to 1000).
If OPENEDIT_ calls the FILE_CREATE_ procedure, it sets the primary and secondary extent
sizes to two pages each and sets the maximum number of extents to 900.
If OPENEDIT_ opens a file that is already open by the same process, it writes to disk all the
buffers for that file, including directory information. This assures that the file is in an up-to-date
state at the completion of the open. For a general discussion of coordinating concurrent file
access, see the Guardian Programmer's Guide.
See also the Considerations for the FILE_OPEN_ Procedure (page 457) .
Example
In the following example, OPENEDIT_ calls FILE_OPEN_ for the file $MYVOL.TEST.AFILE. These
default values are used: read-only, shared access, nowait mode, sync depth of 0, and no unbuffered
writes:
STRING .EXT fname[0:16] := [ $MYVOL.TEST.AFILE ];
INT length := 17;
INT .EXT fnumber := -1;
.
.
err := OPENEDIT_ ( fname:length, fnumber );
Related Programming Manual
For programming information about the OPENEDIT_ procedure, see the Guardian Programmer's
Guide.
920 Guardian Procedure Calls (O)