Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (O)
Guardian Procedure Calls Reference Manual—522629-013
11-25
OPEN Procedure (Superseded by FILE_OPEN_
Procedure )
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.
•
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.
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.) Refer to the Enscribe Programmer’s Guide for
information about Enscribe block formats.