Simple Mainframe Universe
Home Tutorials Interview Q&A Quiz Mainframe Memes Contact us About us

CICS Troubleshooting


AEY9 resource unavailable

AEY9 means a resource the transaction needs is unavailable — a file closed, a connection down, or a required service missing.

What it means

  • CICS raises AEY9 when an EXEC CICS command targets something not currently usable.
  • It is environmental more often than a code bug.

Common causes

  • File closed or disabled (after an error or by operations).
  • Connection to DB2, MQ or a remote region is down.
  • Required program or mapset not available.

How to diagnose

  • Identify the failing command from the dump or trace.
  • Check resource status: CEMT INQUIRE FILE/ CONNECTION/ PROGRAM.
  • Ask operations about recent region changes or outages.

How to fix it

  • Open/enable the resource once the underlying issue is resolved.
  • Fix the connection or restart the dependent service.
  • Add RESP handling so the transaction degrades gracefully instead of abending.

Example: Handle unavailable resources gracefully

EXEC CICS READ FILE("CUSTFILE") INTO(WS-REC) RIDFLD(WS-KEY) RESP(WS-RESP) END-EXEC IF WS-RESP NOT = DFHRESP(NORMAL) *> log it, tell the user, do not abend END-IF.

RESP checking turns AEY9-class failures into friendly messages.

Interview tip

  • Q: How would you troubleshoot a AEY9 resource unavailable in production?
  • A: I would identify the failing command, check the resource status with CEMT, coordinate with operations on the outage, and add RESP handling.

Prevention checklist

  • Monitor resource status.
  • Always code RESP on resource commands.
  • Test failure scenarios.




© copyright mainframebug.com
Privacy Policy
MainframeBug Assistant