One of the things that all CICS installations are trying to avoid is a looping CICS program. Because of this IBM introduced the parameter runaway time right from the start. If a CICS task uses more CPU time between two EXEC CICS calls than specified in runaway time the CICS task is automatically cancelled with an AICA abend. From time to time programs are introduced that needs more CPU between two EXEC CICS calls than runaway time allows.
The easiest and unfortunately also worst way of solving the problem is to increase the value of runaway time. You can do this by using CEMT I SYS if you are properly authorised. CEMT I SYS shows you the current value of runaway time in milliseconds. When you increase runaway time in CEMT I SYS the risk is that tasks that should have been cancelled much faster gets a longer leash.
Another way of solving the problem is to introduce an EXEC CICS SUSPEND in central places in the code that requires excessive CPU. The advantage of EXEC CICS SUSPEND is that it has absolete no effect apart from suspending the task and giving control to another suspended CICS task. At some time CICS will decide to give control to the CPU intensive task again. This is a good solution, but the problem is that if the task really loops it will not be automatically stopped by CICS. On the other hand it does not cause too much damage if EXEC CICS SUSPEND is issued often by the looping task.
There is one more solution to the problem which is to specify runaway time on transaction level. In CEDA there is a parameter called runaway which can be specified as SYSTEM, 0 or a value between 500 and a very large number. Too large in my opinion. SYSTEM is the default and means that the general value from CEMT I SYS is used. 0 means no loop control. DO NOT USE THIS VALUE. Other values are in miliseconds.
For some strange reason it is not possible to adjust the runaway parameter on transaction level using CEMT I TRANS. That would have been nice. If you are a CICS expert you can use EXEC CICS INQUIRE TRANSACTION and EXEC CICS SET TRANSACTION to adjust the runaway parameter on the fly. And remember that CECI can perform any EXEC CICS command, so proper authorisation to CECI gives you access to adjust runaway on transaction level on the fly.