Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (T-V)
Guardian Procedure Calls Reference Manual522629-013
15-21
UNLOCKFILE Procedure
tag input
INT(32):value
is for nowait I/O only.
tag is a value you define that uniquely identifies the
operation associated with this UNLOCKFILE.
Condition Code Settings
< (CCL) indicates that an error occurred (call FILE_GETINFO_ or FILEINFO).
= (CCE) indicates that the UNLOCKFILE was successful.
> (CCG) indicates that the file is not a disk file.
Considerations
Nowait and UNLOCKFILE
The UNLOCKFILE procedure must complete with a corresponding call to the
AWAITIO[X] procedure when used with a file that is opened nowait.
Locking queue
If any users are queued in the locking queue for the file, the process at the head of
the locking queue is granted access and is removed from the queue (the next read
or lock request moves to the head of the queue).
If the next user in the locking queue is waiting to:
lock the file or lock a record in the file, it is granted the lock (which excludes
other users from accessing the file) and resumes processing.
read the file, its read is processed.
Transaction Management Facility (TMF) and UNLOCKFILE
Locks on a file audited by TMF which has been modified by the current transaction
are released only when the transaction is ended or aborted by TMF; in other
words, a locked audited file which has been modified by the current transaction is
unlocked during an ENDTRANSACTION or ABORTTRANSACTION processing for
that file. An unmodified audited file is unlocked by UNLOCKFILE.
OSS Considerations
This procedure operates only on Guardian objects. If an OSS file is specified,
error 2 is returned
Note. The system stores the tag value until the I/O operation completes. The system then
returns the tag information to the program in the tag parameter of the call to AWAITIO[X],
thus indicating that the operation completed.