Kbase P18296: Getting record locking errors, ways to reduce them
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  15/10/2008 |
|
Status: Verified
SYMPTOM(s):
Getting record locking errors
** <file name> record is locked. (445)
<file-name> in use by <user> on <tty>. Wait or press <STOP> to stop. (121)
CHANGE:
Added code that creates a procedure level transaction
CAUSE:
An active transaction scope is raised to the whole procedure level. Hence all exclusive locks will not be released before the end of the procedure.
FIX:
Limit the scope of the transaction by:
1) Determine the statement or statements that start the transaction.
2) Limit the transaction scope using a DO TRANSACTION, FOR EACH TRANSACTION, or REPEAT TRANSACTION block as needed (sample syntax is shown below):
DO TRANSACTION:
...
...
END.
FOR EACH TRANSACTION:
...
...
END.
REPEAT TRANSACTION:
...
...
END.