This Knowledge Document explains how to detect loops within a schedule issuing 'Loop Detected' or 'Limit Reached. Loop?'.
CA Jobtrac JM currently offers two methods to detect successor loops:
The 'L' line command and the (sample REXX) Imod LOOPDET as explained below.
- The 'L' line command:
The primary purpose of this Scheduled Event Network panel is to list all the event's predecessors and successors. If an event belonging to a loop is selected, then message "Loop Detected" is issued. If there's a loop, but the selected event doesn't directly belong to it, then the message "Limit Reached. Loop?" is issued.
- Imod LOOPDET:
Because of the recursive call of an internal subroutine, the online execution (SRVEDIT or JOBTRAC) may result in error message SRV277/GRX0011I (with "Control stack full"), so it is best to run in batch. It either issues message "LOOPDET00 CHECKPOINT VERIFIED: NO LOOPS" or "LOOPDET99 LOOP HAS BEEN DETECTED: SUCCESSOR CHAIN FOLLOWS". The JCL for the batch job is as follows:
//jobname JOB . . . your accounting data . . . //STEP1 EXEC PGM=SRVBATCH,PARM='LOOPDET' //STEPLIB DD DISP=SHR,DSN=your.Jobtrac.CAILIB // DD DISP=SHR,DSN=your.GSS.CAILIB // DD DISP=SHR,DSN=your.DATACOM.CUSLIB // DD DISP=SHR,DSN=your.DATACOM.CAILIB //IMOD DD DISP=SHR,DSN=your.sample.REXX.ISET.file //JOBTRACx DD DUMMY with 'x' as your Jobtrac Token //PARMLIB DD * ADDRESS JOBTRAC GJTRGCUU 15 MAXTASK 5 TYPE 3 //ISRVLOG DD SYSOUT=* //OUTPUT DD SYSOUT=* //