Gen 8.6 SQL Code -911 in CICS DB2 environment
search cancel

Gen 8.6 SQL Code -911 in CICS DB2 environment

book

Article ID: 136953

calendar_today

Updated On:

Products

Gen Gen - Workstation Toolset Gen - Run Time Distributed

Issue/Introduction

Using Gen 8.6 CICS application.
According to IBM information DB2 under CICS now changes the SQL -911 code to -913 in case of deadlock or timeout situation.
See: PH06500: SQLCODE911 RC00C9008E TIMEOUT ISSUED INCORRECTLY BY DSNXEAAL SQLERRD1 -130 WITH IMS MPP OR CICS. NO ROLLBACK
Problem conclusion
Db2 code has been changed so that SQLCODE913 is issued by
DSNXEAAL when package loading fails with timeout or deadlock.

After this APAR, CICS and IMS will receive sqlcode -913 for
timeouts and deadlocks. Other connections (such as batch and
distributed applications) to Db2 will receive sqlcode -911 for
timeouts and deadlocks and Db2 drives a rollback.

Within Gen we use the Gen statements :
WHEN DATABASE_DEADLOCK_OR_TIMEOUT etc.
Does the change of DB2 behaviour influence the behaviour of the Gen statement results?

Resolution

DB2 SQL Codes are documented here: Db2 for z/OS > version 13 > Error (−) SQL codes
-911
THE CURRENT UNIT OF WORK HAS BEEN ROLLED BACK DUE TO DEADLOCK OR TIMEOUT. REASON reason-code, TYPE OF RESOURCE resource-type, AND RESOURCE NAME resource-name
-913
UNSUCCESSFUL EXECUTION CAUSED BY DEADLOCK OR TIMEOUT. REASON CODE reason-code, TYPE OF RESOURCE resource-type, AND RESOURCE NAME resource-name

The change of SQL Code from -911 to -913 has no impact on Gen. The Gen behaviour for any deadlock or timeout situation is the same, rollback any changes and retry the transaction. By default Gen does 10 retries for CICS DB2 applications but the number of retries can be controlled by Gen CICS RETRY User Exits - TIRCRTRX/TIRCURTX for Block Mode and TIRSRTRX/TIRSURTX for Cooperative applications. 

The Gen documentation covers this in a number of areas - some of it is documented under Toolset because that is where the DATABASE EXCEPTIONS and RETRY statements are added to Action Diagrams, but it applies to z/OS applications just the same. 

Here are documentation links: 

Database Exception: 
Developing > Designing > ... > DATABASE EXCEPTION
Developing > Designing > ... > DATABASE EXCEPTION Statement


RETRY Transaction:
Developing > Designing > ... > RETRY TRANSACTION