Enscribe Programmer's Guide
Table 4 File-System Procedures (continued)
DescriptionProcedure
Locks a record (or a set of records if generic locking is enabled for a
key-sequenced file) in an open disk file so that other processes cannot
access it.
LOCKREC
Sets position by primary key within an entry-sequenced or relative file;
defines a subset of the file for subsequent access, by setting the current
POSITION
position, access path, and positioning mode; also can specify new current
position within an unstructured file. Procedure accepts a 4-byte record
specifier; it cannot be used with files larger than 4 GB.
Following positioning, returns the first record of a subset; otherwise, it
returns the next record in the current access path.
READ[X]
Is the same as READ[X], but locks the record before reading it.READLOCK[X]
Returns the record indicated by the current key value; READUPDATE[X] is
used to randomly read an open file.
READUPDATE[X]
Is the same as READUPDATE[X] except that it locks the record before
reading it.
READUPDATELOCK[X]
Restores the disk file position information saved with a previous
SAVEPOSITION call.
REPOSITION
Saves the current disk file position information; a later call to REPOSITION
restores the saved position.
SAVEPOSITION
Sets device-dependent functions in an open file.SETMODE
Sets device-dependent functions for an open file.SETMODENOWAIT
Unlocks an open disk file currently locked by the caller; unlocks any records
in the file that are currently locked by the caller.
UNLOCKFILE
Unlocks a record currently locked by the caller. If generic locking is
enabled, calls to UNLOCKREC are ignored.
UNLOCKREC
Inserts (adds) a new record into an open disk file location positioned by
the last call to READ[X] or READUPDATE[X].
WRITE[X]
Replaces (updates) or deletes data in the record indicated by the current
key value of an open file.
WRITEUPDATE[X]
Is the same as WRITEUPDATE[X], but unlocks the record after its contents
are updated or deleted.
WRITEUPDATEUNLOCK[X]
Procedure Call Completion
If a file is open with nowait I/O specified, calls to CONTROL, FILE_CONTROL64_,
FILE_LOCKFILE64_, FILE_LOCKREC64_, FILE_READ64_, FILE_READLOCK64_,
FILE_READUPDATE64_, FILE_READUPDATELOCK64_, FILE_UNLOCKFILE64_, FILE_UNLOCKREC64_,
FILE_WRITE64_, FILE_WRITEUPDATEUNLOCK64_, FILE_SETMODENOWAIT64_, LOCKFILE,
LOCKREC, READ[X], READLOCK[X], READUPDATE[X], READUPDATELOCK[X], UNLOCKFILE,
UNLOCKREC, WRITE[X], WRITEUPDATEUNLOCK[X], or SETMODENOWAIT must be completed
by a corresponding call to AWAITIO[X]/FILE_AWAITIO64_.
If a file is open with nowait I/O specified, calls to FILE_RENAME_,
FILE_SETKEY_,FILE_SETPOSITION_,KEYPOSITION, POSITION, REPOSITION, SETMODE,
FILE_SETMODENOWAIT64_ or SETMODENOWAIT are rejected with file-system error 27 if there
are any outstanding operations pending. Regardless of whether the file was opened with waited
or nowait I/O specified, a return from a call to CANCELREQ, FILE_CLOSE_, FILE_CREATE_,
FILE_GETINFO_, FILE_GETINFOBYNAME_, FILE_GETINFOLIST_, FILE_OPEN_ (unless options
.<1> = 1), FILE_PURGE_, FILE_RENAME_, FILENAME_FINDNEXT64_, FILENAME_FINDNEXT_,
KEYPOSITION, POSITION, or SETMODE indicates a completion.
File-System Procedures 41