MainframeKit

AICA

Task runawayCICS ABEND

CICS ended the task because it ran for too long without giving control back, usually because of a loop.

MOST LIKELY

A loop in the program whose exit condition is never met.

FIRST CHECK

Turn on dumping for AICA and reproduce the problem so you get a transaction dump.

TRY IT ▸

MainframeKit assistant

What it means

CICS watches for tasks that keep the processor without returning control to CICS. When a task runs past the allowed limit, CICS treats it as a runaway and ends it with AICA so other tasks can run.

IBM notes that a loop that ends in AICA is either a tight loop or a loop that never issues a CICS command that would let other work in.

Typical causes

  • A loop in the program whose exit condition is never met.
  • A loop that does heavy work without issuing any CICS commands.
  • A program that does not handle an unexpected response from a CICS command and keeps retrying it.
  • Very long processing in one task that is longer than the runaway limit the region allows.

How to fix it

  1. Turn on dumping for AICA and reproduce the problem so you get a transaction dump.
  2. In the dump, find the task flagged as the runaway and look at its linkage stack to see which program was in control.
  3. Use the PSW and the trace table to find the instructions that repeat.
  4. Check the CICS command responses just before the loop for a condition the program did not handle.
  5. Fix the loop logic; if the loop is in CICS code rather than your program, contact IBM support.

Example

Illustrative only; names and values are invented.

DFHAC2236 11:02:10 APPL01 Transaction TRN1 abend AICA in program PROG01 term T001. Updates to local recoverable resources will be backed out.