# ATCH: Task purged before a domain call finished

Source: https://wndsoftware.com/mainframe-errors/atch

### ATCH: Task purged before a domain call finished

An ATCH abend means a CICS task was purged before a call it had made into a CICS domain could finish. The purge came from an operator, from the transaction's deadlock timeout, or from CICS itself.


#### Other names for this code

Also written as `ATCH abend`, `CICS ATCH`, `abend ATCH`, `abendATCH`, `ATCH purged`.


### What it means

CICS is split into domains and components, and a task often waits inside one of them. It might be waiting for a send to a terminal to complete, for a reply from another region, or for a terminal or connection definition to be installed. If the task is purged during that wait, the call can't finish normally. CICS ends the task with ATCH and takes a transaction dump. The task that first noticed the purge writes an exception trace entry.

The modules IBM lists for ATCH are mostly terminal control, the builders that install terminal and connection definitions, transaction routing, and the MRO and LU6.2 support. So ATCH usually hits tasks that were waiting on a terminal, a session or a link to another region.

ATCH tells you where the task was when the purge took effect, not why it was purged.


### Common causes

- An operator purged the task with CEMT, often to clear what looked like a deadlock or a hung session.
- The task waited longer than the transaction's deadlock timeout (DTIMOUT). IBM notes that a common reason is not enough storage for the number of tasks in the region.
- CICS purged the task itself so that a blocked operation could finish or to protect data integrity. IBM's example is a coupling facility data table whose server pool has recycled. CICS purges tasks holding recoverable updates to that table so their units of work are backed out.
- A remote region, session or terminal stopped responding, and one of the above purged the task that was waiting on it.


### How to find the problem

- Find the DFHAC message for the abend in the region's message log and note the time and terminal.
- Look at the messages just before it for problems with the terminal, the session or the connection to the other region.
- Read the exception trace entry in the transaction dump. It shows where the purge was detected.
- Ask operations whether anyone purged the task, and check the transaction's DTIMOUT and SPURGE values.
- Check for short-on-storage messages from the storage manager (DFHSM prefix) and for any messages about a coupling facility data table server at the same time.


### How to fix it

- Find and fix whatever the task was waiting for, such as a remote region that stopped responding or a session that was never released.
- If storage was short, IBM suggests adding storage, cutting the number of tasks (for example with MXT or transaction classes), or raising DTIMOUT.
- If CICS purged the task after a coupling facility data table server pool recycled, no change is needed. The units of work were backed out on purpose. Rerun the work once the pool is back.
- Agree with operations when tasks may be purged, so an ATCH is expected rather than a surprise.


### IBM documentation

[IBM documentation: ATCH](https://www.ibm.com/docs/en/cics-ts/6.x?topic=codes-atch). Use the documentation for your installed release.

[Report a correction to WND Software](https://wndsoftware.com/contact#message).

Last reviewed 2026-10-18 by the WND Software team. Written in our own words. For the full reference, check IBM’s CICS documentation for your release.


### Related codes

[AEXY Task purged during a CICS command Read →](https://wndsoftware.com/mainframe-errors/aexy)
[AKC3 Task purged Read →](https://wndsoftware.com/mainframe-errors/akc3)
[AKCS Deadlock timeout in CICS Read →](https://wndsoftware.com/mainframe-errors/akcs)
[ATNI Task abended after a terminal error Read →](https://wndsoftware.com/mainframe-errors/atni)
[AICA Runaway task (loop) in CICS Read →](https://wndsoftware.com/mainframe-errors/aica)

### Questions


#### How is ATCH different from AEXY?

Both mean the task was purged. ATCH is used when the purge catches the task during a call into a CICS domain, often terminal control or intersystem code. AEXY is used when it catches the task during EXEC CICS command processing or while waiting to be dispatched.


#### Why does IBM mention storage for a timeout?

When a region is short on storage, tasks wait longer to get it. A wait that runs past DTIMOUT ends in a purge, and the purged task can get ATCH.


#### Are the task's updates backed out?

Yes. Changes the task made to recoverable resources in its current unit of work are backed out.

[CICS transaction abends](https://wndsoftware.com/mainframe-errors/cics-abends) · [ASRD](https://wndsoftware.com/mainframe-errors/asrd) · [ATNI](https://wndsoftware.com/mainframe-errors/atni)

[← All error codes](https://wndsoftware.com/mainframe-errors/)
