Module 11: DB2 SQLCODE, SQLSTATE and Error Handling
SQLCODE -913
What SQLCODE -913 means
- -913 means your program was the victim of a deadlock or timeout.
- The SQLSTATE is 40502.
- The critical difference from -911: NO rollback has been done. Your program must issue the ROLLBACK.
-913 vs -911
- -911: DB2 rolled back automatically. You may retry.
- -913: DB2 did NOT roll back. You must EXEC SQL ROLLBACK before doing anything else.
- Continuing without a rollback leaves the unit of work in an unknown state.
- Never COMMIT after -913 without the rollback. You could commit partial work.
Handling -913 - rollback, then retry
MainframeBug Assistant