Using KSAM/XL and KSAM 64 (32650-90886)

160 Chapter9
KSAM Intrinsics
HPFOPEN
13 I32 Exclusive:
Passes a value indicating continuous exclusive access to the file, from
open to close. Use this option when performing a critical operation (for
example, updating the file).
The following values are valid:
0If
itemnum
=11 specifies read only access, read-share
access takes effect. Otherwise, exclusive access takes
effect. Regardless of which access option was selected,
FFILEINFO reports zero.
1 Exclusive access. After the file is opened, any
additional HPFOPEN/FOPEN requests for this file,
whether issued by this process or another process, are
prohibited until this process issues the FCLOSE request
or terminates. If any process is already accessing this
file when an HPFOPEN/FOPEN call is issued with
exclusive access specified, an error status is returned
to the process. If another HPFOPEN/FOPEN call is
issued for this file while exclusive access is in effect, an
error code is returned to the process that issued that
HPFOPEN/FOPEN call. Request exclusive access only if
the lock access mode is allowed by the security
provisions for the file. For message files, specifying this
value means that there can be only one reader and one
writer.
Table 9-7. HPFOPEN Itemnum/Item Values
Itemnum Mnemonic Item Description