JOB and EXEC TIME parameter
- The system prints the actual processor time used by the job or step in the messages in the job log.
- When a job or step exceeds the amount of time coded on the TIME parameter, the system abnormally terminates it or gives control to an installation exit routine established through System Management Facilities (SMF). Thus, the TIME value limits the processor time wasted by a looping program.
By coding TIME=1440 or TIME=NOLIMIT, the TIME parameter can instead be used to give a job or step an unlimited amount of time. Specifically, the system allows a step to remain in a continuous wait state for an unlimited time, rather than the time limit established through SMF. However, if TIME=1440 is specified on the JOB statement, any TIME values on an EXEC statement and any default TIME values will be nullified. All steps within the job will have unlimited time, as with TIME=1440 or TIME=NOLIMIT.
To allow a job or step to use the maximum amount of time, code TIME=MAXIMUM. Coding TIME=maximum allows the job or step to run for 357912 minutes.
//FIRST JOB ,'E.D. WILLIAMSON',TIME=2 //STEP1 EXEC PGM=A,TIME=1 //STEP2 EXEC PGM=B,TIME=1
In this example, the job is allowed 2 minutes of execution time and each step is allowed 1 minute. Should either step try to execute beyond 1 minute, the job will terminate beginning with that step.
//SECOND JOB ,'M. CARLO',TIME=3 //STEP1 EXEC PGM=C,TIME=2 //STEP2 EXEC PGM=D,TIME=2
In this example, the job is allowed 3 minutes of execution time. Each step is allowed 2 minutes of execution time. Should either step try to execute beyond 2 minutes, the job will terminate beginning with that step. If STEP1 executes in 1.74 minutes and if STEP2 tries to execute beyond 1.26 minutes, the job will be terminated because of the 3-minute time limit specified on the JOB statement.
//THIRD JOB ,'A. DOMENICK',TIME=2 //STEP1 EXEC PGM=E,TIME=3
In this example, the job is allowed 2 minutes of execution time. Since the time specified on the JOB statement is less than the time on the EXEC statement, STEP1 is only allowed 2 minutes of execution time. If STEP1 attempts to execute beyond 2 minutes, the job will terminate in that step.
//AAA EXEC PROC=PROC5,TIME=20
In this example, the EXEC statement sets a time limit for an entire procedure. This specification overrides any TIME parameters in the procedure, if coded.
//AAA EXEC PROC=PROC5,TIME.ABC=20,TIME.DEF=(3,40)
In this example, the EXEC statement sets a time limit for two steps, ABC and DEF, of the called cataloged procedure.