A.06.30 Release Notes
The following example demonstrates this:
! Begin transaction
DBBEGIN("",1,S(*))
...
! Write-Lock customer 12345
PREDICATE Q$ FROM "CUSTOMER","CUSTNO","=",12345
DBLOCK(Db$,Q$,6,S(*))
...
! Update customer record
DBUPDATE(Db$,"CUSTOMER",1,S(*),"@",Buf$)
...
! Unlock customer. The lock is not freed until the transaction completes.
DBUNLOCK(Db$,"",1,S(*))
...
! This will also release freed locks
DBCOMMIT(1,S(*))
...
With previous HP Eloquence versions database locks were independend from transactions. This could lead to a situation where a record is locked by a transaction (because it was modified in a transaction) and another user aquires a lock and then tries to update the same record.
The lock status is marked as "PENDING" in the http status display and dbctl output.