Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (O)
Guardian Procedure Calls Reference Manual522629-013
11-41
OPENEDIT Procedure (Superseded by OPENEDIT_
Procedure )
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 flags, 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 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, refer to the
Guardian
Programmer’s Guide.
Also refer to “Considerations” for the OPEN procedure.
Example
In the following example, OPENEDIT calls OPEN for the file $MYVOL.TEST.AFILE.
The default
flag values are used (read-only, shared access, and nowait mode).
INT .EXT fname[0:11] := [ “$MYVOL TEST AFILE ” ];
INT .EXT fnumber := -1;
.
.
err := OPENEDIT ( fname, fnumber );
Related Programming Manual
For programming information about the IOEdit procedures, refer to the Guardian
Programmer’s Guide
.