What it means
AEIM is the abend for an unhandled NOTFND condition. NOTFND means a file control command looked for a record by its key and there was no record with that key. READ, DELETE with a key, STARTBR and RESETBR can all return it.
A missing record is usually normal business. It might be a new customer or a mistyped account number, so most programs expect it. The abend happens when the code assumes the record is always there. If the command has a RESP(WS-RESP) option, CICS returns control with the condition in WS-RESP, and the program can test it against DFHRESP(NOTFND). An older program might use HANDLE CONDITION NOTFND(paragraph) to jump to a paragraph instead. With neither in place, the default action for NOTFND is to abend the task with AEIM.
Common causes
- The user entered a key that doesn't exist, and the program has no RESP check or HANDLE CONDITION for NOTFND.
- The key is built wrongly. Missing leading zeros, spaces instead of zeros, a field moved into the wrong position of the key, or the wrong KEYLENGTH on a generic read all produce a key that matches nothing.
- The program reads the wrong file. The FILE name comes from a variable with the wrong value, or the FILE definition in this region points at a different data set, such as test data in a production region.
- Another task or a batch job deleted the record between two steps of the transaction.
How to find the problem
- The terminal message
DFHAC2206names the transaction. In the transaction dump, the EIB shows the failing command in EIBFN and the file name in EIBRSRCE. - Run the transaction under CEDF. It stops on each file command and shows the RIDFLD key it sent, and you can look at it in hex. Comparing that with the real key in the file usually shows the mistake quickly.
- Check the data set. Use File Manager or an IDCAMS PRINT with FROMKEY and TOKEY to see whether a record with that key exists.
- Run
CEMT INQUIRE FILE(name)to see which data set the CICS file points to in this region.
How to fix it
- Handle the condition. Code
RESP(WS-RESP)on the READ, then testWHEN DFHRESP(NORMAL)andWHEN DFHRESP(NOTFND)in an EVALUATE. Show the user a message such as 'Account not found' instead of ending the task. - Fix the code that builds the key so its format matches the file exactly, including padding and numeric format.
- If the FILE definition points at the wrong data set, the CICS systems programmers need to correct it.
- AEIM is almost always fixed by the application team.
What it looks like
DFHDU0203I 10/12/2026 10:44:12 CICSPRD1 A transaction dump was taken for dumpcode: AEIM, Dumpid: 1/0018. DFHAC2206 10:44:12 CICSPRD1 Transaction CUS2 failed with abend AEIM. Updates to local recoverable resources backed out.