FUNLOCK [ KSAM/3000 Reference Manual ] MPE/iX 5.0 Documentation
KSAM/3000 Reference Manual
FUNLOCK
INTRINSIC NUMBER 16
Dynamically unlocks a KSAM file.
IV
FUNLOCK(filenum);
The FUNLOCK intrinsic dynamically unlocks a KSAM file (Resource
Identification Number) that has been locked with the FLOCK intrinsic.
PARAMETERS
filenum integer by value (required)
A word supplying the file number of the file to be
unlocked.
CONDITION CODES
CCE Request granted.
CCG Request denied because the file had not been locked by
the calling process.
CCL Request denied because the file was not opened with the
dynamic locking aoption of the FOPEN intrinsic, or the
filenum parameter is invalid.
SPECIAL CONSIDERATIONS
Split stack calls permitted.
USING FUNLOCK
A file that has been locked with FLOCK in order to allow exclusive
updating should be unlocked with FUNLOCK as soon as the update is
complete. Dynamic locking and unlocking apply to files opened for this
capability. In the aoptions parameter of FOPEN, bit 10 must be set to 1
in order to use either FLOCK or FUNLOCK. (For more discussion of dynamic
locking and unlocking, refer to the FLOCK intrinsic description.)
Suppose a file has been locked to allow update of a record. To unlock
the file following completion of the update, use the call:
FUNLOCK(FILNUM);
When FUNLOCK is executed, all output written while the file was locked is
transferred to the file so that other users have the most recent data.
MPE/iX 5.0 Documentation