How a CICS exit routine can avoid the storm-drain effect
You can write a resource manager interface program exit routine, XRMIOUT, to avoid the storm drain effect caused by SQLCODE -904 (resource unavailable). This exit routine does not avoid the storm-drain problem caused by using INQUIRE EXITPROGRAM to avoid AEY9 abends.
About this task
Using XRMIOUT, you can intercept
the return from the resource manager. The exit routine can determine
whether:
- The resource manager is Db2.
- SQLCODE -904 is in the SQL communication area (SQLCA).
If these conditions exist, abend the transaction instead of ending the transaction normally.
To determine if Db2 is the resource manager, compare 'DSNCSQL' with the value stored at the address that is included with the UEPTRUEN parameter that is passed to XRMIOUT, as shown in the following figure.
Procedure
To find the SQLCODE: