Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (F)
Guardian Procedure Calls Reference Manual522629-013
5-118
FILE_OPEN_ Procedure
elections input
INT (32) :value, input
specifies the following options:
<0:30> Reserved (specify 0).
<31> Use 64-bit primary keys. For disk files only, bit <31> specifies that 64-
bit primary-key values are used instead of 32-bit values for
unstructured, relative, or entry-sequenced files. Bit <31> is ignored for
key-sequenced files and nondisk devices. The
elections parameter
can be used with both Format 1 and Format 2 files.
If omitted, 0 is used.
General Considerations
File numbers
File numbers are unique within a process. The lowest file number is 0 and is
reserved for $RECEIVE; the remaining file numbers start at 1. The lowest
available file number is always assigned, except in the case of backup opens.
When a file is closed, its file number becomes available for a subsequent file open
to use.
Maximum number of open files
The maximum number of files in the system that can be open at any given time
depends on the space available for control blocks: access control blocks (ACBs),
file control blocks (FCBs), and open control blocks (OCBs). The amount of space
available for control blocks is limited primarily by the physical memory size of the
system. The maximum amount of space for ACBs is determined by the size of the
process file segment (PFS). Refer to the description of the
pfs-size parameter
under the PROCESS_CREATE_ procedure.
Multiple opens by the same process
If a given file is opened more than once by the same process, a unique file number
is returned for each open. These file numbers provide logically separate accesses
to the same file; each file number has its own ACB, its own file position, and its
own last error value. If a nowait IO operation is started and a second nowait
operation is started (using a second file number for the same file), the IO requests
are independent and may arrive in either order at the destination and may
complete in either order.