To understand what is Runaway tasks, you should know something about ICVR.
ICVR is a system initialization parameter in SIT that specifies the runaway task time interval in milliseconds as a decimal number. CICS purges a task if it has not given up control after this length of time (that is, if the task appears to be looping). The default value is 5000 milliseconds.
What is meant by Runaway task?
If the time needed to execute a TASK is longer than the runaway task time interval (ICVR) parameter in the SIT, CICS assumes that the program is looping and terminates it with code AICA. This type of tasks are referred as RUNAWAY TASKS.
As explained earlier, an AICA abend occurs when CICS detects that an
application program is looping. Whether CICS considers a program to be
looping depends on the length of time that elapses between successive CICS commands.
how can we resolve it?
CICS only resets a task's runaway time (ICVR) when a task is suspended. An EXEC CICS command cannot be guaranteed to cause a task to suspend during processing because of the unique nature of each CICS implementation. The runaway time may be exceeded causing a task to abend AICA. This abend can be prevented by coding an EXEC CICS SUSPENDcommand in the application This causes the dispatcher to suspend the task that issued the request and allow any task of higher priority to run. If there is no task ready to run, the program that issued the suspend is resumed.[b]