Consultor Eletrônico



Kbase P71419: The record lock is not released on the AS/400 when FOR EACH is cancelled
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/3/2005
Status: Unverified

FACT(s) (Environment):

IBM AS/400 (RISC)
Progress/400 DataServer
Progress 9.x

SYMPTOM(s):

The record lock is not released on the AS/400 when FOR EACH is cancelled

When running a query to update a record and pressing Esc key (ENDKEY) - the record remains locked on AS/400.

The issue happens only with FOR EACH and not with FIND statements.

The problem occurs only when Progress locking mechanism (PROLKT) is utilized.

CAUSE:

The exact cause is unknown at the time of this writing.

FIX:

There are some workarounds available to avoid this problem:

1. Do not use Progress lock table and remove PROLKT user space file letting AS/400 handle the locks

or

2. Use explicit transaction scope, for example:
DO TRANSACTION:
FOR EACH customer EXCLUSIVE-LOCK
WHERE cust-num=1.
UPDATE customer.
END.
END.

or

3. Run the query with a separate update block, for example:
FOR EACH customer EXCLUSIVE-LOCK
WHERE cust-num = 1.
DO ON ENDKEY UNDO, LEAVE:
UPDATE customer.
END.
END.