RPG (IBM i / AS/400) · DB2 SQLCODE
What does SQLCODE -913 - Deadlock or Timeout mean in RPG (IBM i / AS/400)?
The SQL statement was waiting on a lock held by another job, and either a deadlock was detected or the lock wait time expired before the lock could be obtained - and unlike some lock errors, no automatic rollback happens for this one.
The SQL statement was waiting on a lock held by another job, and either a deadlock was detected or the lock wait time expired before the lock could be obtained - and unlike some lock errors, no automatic rollback happens for this one.
Catch SQLCODE -913 and decide whether to retry the statement after a short delay, review the transaction's lock scope and commit frequency if this happens often under load, and check the job's lock wait time attribute if timeouts are too aggressive.