Kbase P18216: How to know when a record is locked
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  27/01/2003 |
|
Status: Unverified
GOAL:
How to know when a record is locked
GOAL:
How to check if a record is locked before do something with it
FACT(s) (Environment):
Progress/WebSpeed Versions
FIX:
The following code could be useful to know when a record is locked and decide what to do until the record is released:
REPEAT:
FIND FIRST CUSTOMER WHERE customer.cust-num = 12
EXCLUSIVE-LOCK NO-ERROR NO-WAIT.
IF LOCKED(customer)
THEN DO:
PAUSE 1 NO-MESSAGE.
NEXT.
END.
ELSE DO:
ASSIGN customer..............................
LEAVE.
END.
END. /*repeat*/
FIND CURRENT customer NO-LOCK NO-ERROR.