Unlock (27)
The Unlock operation (B_UNLOCK) unlocks one or more records that have been locked explicitly (that is, the records were locked using a lock bias of +100, +200, +300, or +400). The Unlock operation releases locks held by the specified position block; therefore, if you have the same file opened more than once, you must issue an Unlock for each position block before the record is completely unlocked. Similarly, each client that holds a lock on records in the file must issue an Unlock before the record is completely unlocked.
Parameters
 
Prerequisites
You must have at least one record lock.
Procedure
1
2
3
1
2
3
4
5
1
2
3
Result
If the Unlock operation is successful, the transactional interface releases all the locks that the operation specified.
If the Unlock operation is unsuccessful, the transactional interface returns a nonzero status code—most likely, Status Code 81.
Positioning
The Unlock operation has no effect on positioning.