Yielding loops
Yielding loops are characterized by returning control at some point to a CICS routine that can suspend the looping task. However, the looping task is eventually resumed, and so the loop continues.
CICS is unable to use the runaway task timer to detect yielding loops, because the timer is reset whenever the task is suspended. Thus, the runaway task time is unlikely ever to be exceeded, and so the loop goes undetected by the system.
Yielding loops typically involve a number of programs. The programs might be linked to and returned from, or control might be transferred from one program to another in the loop. A yielding loop can also be confined to just one program, in which case it must contain at least one wait-enabling CICS command.
PROCEDURE DIVISION.
EXEC CICS
HANDLE CONDITION ERROR(ERROR-EXIT)
ENDFILE(END-MSG)
END-EXEC.
ROUTE-FILE.
EXEC CICS
ROUTE INTERVAL(0)
LIST(TERM-ID)
END-EXEC.
NEW-LINE-ATTRIBUTE.
EXEC CICS
SUSPEND
END-EXEC.
GO TO NEW-LINE-ATTRIBUTE.
MOVE LOW-VALUES TO PRNTAREA.
MOVE DFHBMPNL TO PRNTAREA.
If you suspect that you have a yielding loop, turn to Investigating loops that are not detected by CICS for further guidance.