CICS AEY9 — Db2 is not available to CICS
A transaction issued EXEC SQL while the CICS Db2 connection was not there. Check Db2 and the DB2CONN, reconnect, and consider letting CICS reconnect by itself.
What happened
Transactions that use Db2 started abending AEY9, often after Db2 was stopped or restarted. Transactions that do not use Db2 still work.
What it means
The program issued an EXEC SQL request, but the CICS Db2 attachment facility was not available: Db2 was down, or the connection had been stopped (CEMT SET DB2CONN NOTCONNECTED, DSNC STOP). If the connection is defined with CONNECTERROR(SQLCODE), the program gets SQLCODE -923 instead of the abend.
Typical causes
- Db2 was restarted, and the connection was defined with STANDBYMODE(CONNECT): it waits for Db2 at connect time but ends if Db2 fails later, so it does not come back on its own.
- Someone stopped the connection for maintenance and did not start it again.
- Db2 is down.
Where to look
- Is Db2 up?
- CEMT INQUIRE DB2CONN: is the connection CONNECTED?
- The DB2CONN definition: STANDBYMODE and CONNECTERROR.
How to fix it
- When Db2 is up, start the connection: CEMT SET DB2CONN CONNECTED (the same as DSNC STRT).
- Retry the failed work; tell the users.
- To avoid it next time, consider STANDBYMODE(RECONNECT): after a Db2 failure the connection goes back to standby and reconnects when Db2 returns.
Interview question
After a Db2 restart, every Db2 transaction in one CICS region abends AEY9; another region is fine. Why, and what do you change?
Stuck on something else?
Ask the community or search the full course.