Accessing Files Programmer's Guide (32650-90885)

26 Chapter2
Creating A File
The HPFOPEN Intrinsic
loaded file. The program must be running in PM to specify
execute-read access. This is changed to execute access for
KSAM, CIR, and RIO files. Not valid for message files.
8 Reserved for MPE/iX. No access, opens the file or directory
without any access checking. A process must be executing
in system code to use this access type.
9 Directory read access, opens a directory for directory read
access. Directories can only be opened for no access or
directory read access. Files cannot be opened for directory
read access.
FIFO files should be opened for Read Access Only (0) or Write Access Only
(1). Other access types can cause unexpected results to occur.
12/I32 Dynamic locking:
Passes a value enabling/disabling file locking for the file. When specified,
the FLOCK and FUNLOCK intrinsics can be used to dynamically
permit/restrict concurrent access to a disk file by other processes at
specified times.
The following values are valid:
0 Disallow dynamic locking/unlocking
1 Allow dynamic locking/unlocking
Default: 0
The process can continue this temporary locking/unlocking until it closes
the file. If several accessors are sharing the file, they must all specify, or
not specify, this option. For example, if a file is opened with the dynamic
locking option enabled, and a subsequent accessor tries to open the file
with dynamic locking disabled, that subsequent attempt to open fails.
Dynamic locking/unlocking is possible through the equivalent of a global
resource identification number (RIN) assigned to the file and temporarily
acquired by HPFOPEN.
Accessors that have opened a file with the dynamic locking option enabled
must access the file through the FLOCK and FUNLOCK intrinsics to gain
exclusive access to the file. Since the use of these intrinsics is
discretionary, however, all accessors must agree to use FLOCK and FUNLOCK
when writing to a file to guarantee exclusive access. File locking is advised,
but is not mandated by MPE/iX.
Lock access must be at the account, group, and file levels for HPFOPEN to
grant this option. (Lock access is available if lock, execute, append, or
write access is set at these levels.) This option is ignored for files not
residing on disk.
This
itemnum
may only be specified with the disallow dynamic locking
value (0) when used with directories.
(ASC) Not used for asynchronous devices.