Guardian Procedure Calls Reference Manual

Disk File Considerations
Maximum number of concurrent nowait operations
The maximum number of concurrent nowait operations permitted for an open of a disk file is
one. Attempting to open a disk file and specify a value greater than 1 returns an error
indication. A subsequent call to FILEINFO or FILE_GETINFO_ shows that an error 28 occurred.
Unstructured files
File pointers after open
After a disk file is opened, the current-record and next-record pointers begin at a relative
byte address (RBA) of zero, and the first data transfer (unless an intervening POSITION
is performed) is from that location. After a successful open, the pointers are:
current-record pointer = 0D
next-record pointer = 0D
Sharing the same EOF pointer
If a given disk file is opened more than once by the same process, separate current-record
and next-record pointers are provided for each open, but all opens share the same EOF
pointer.
Structured files
Accessing structured files as unstructured files
The unstructured access option (flags.<2>) permits a file to be accessed as an
unstructured file. For OPEN, with this option specified, a data transfer occurs to the
position in the file specified by an RBA (instead of to the position indicated by a key
address field or record number); the number of bytes transferred is that specified in the
file-system procedure call (instead of the number of bytes indicated by the record format).
If a partitioned, structured file is opened as an unstructured file, only the first partition is
opened. The remaining partitions must be opened individually with separate calls to
OPEN (each call to OPEN specifying unstructured access).
Accessing audited structured files as unstructured files is not allowed.
CAUTION: Programmers using this option are cautioned that the block format used by
Enscribe must be maintained if the file is to be accessed again in its structured form. (HP
reserves the right to change this block format at any time.) For information about Enscribe
block formats, see the Enscribe Programmer's Guide.
Current-state indicators after open
After successful completion of OPEN, the current-state indicators have these values:
The current position is that of the first record in the file by primary key.
The positioning mode is approximate.
The comparison length is 0.
If READ is called immediately after OPEN for any structured file, it reads the first record
in the file; in a key-sequenced file, this is the first record by primary key. Subsequent
reads, without intervening positioning, read the file sequentially or by primary key through
the last record in the file.
When a key-sequenced file is opened, KEYPOSITION usually is called before any
subsequent I/O call (such as READ, READUPDATE, WRITE) to establish a position in the
file.
OPEN Procedure (Superseded by FILE_OPEN_ Procedure) 905