TIME Parameter


Note! TIME parameter can be coded at the job level as well as step level.

The TIME parameter is used to specify the maximum CPU utilization time allowed for the job to execute. The system will automatically cancel the job execution if the execution time exceeds the specified time. TIME is a keyword parameter and optional.

Syntax -

TIME={([minutes][,seconds])}
      {1440 }
      {NOLIMIT }
      {MAXIMUM }
      {0 }
Minutes Specifies the processor utilization time in minutes.
The Minutes value should be from 0 through 357912 (248.55 days).
If ZERO is coded in the TIME parameter, it may produce unpredictable results.
Seconds Specifies the processor utilization time in seconds.
The seconds value is always coded along with the Minutes.
The seconds value should be between 0 to 59 seconds.
NOLIMIT or 1440 NOLIMIT or 1440 Minutes values are almost the same.
Both specify that the job can use the processor for an unlimited time.
1440 means 24 hours.
MAXIMUM Specifies the JOB can use the processor for the maximum amount of time. i.e., JOB can use the processor for 248.55 days (357912 minutes).
0 If ZERO is coded in the TIME parameter, it may produce unpredictable results.

Abends -

If the TIME coded in the job is insufficient to execute, JOB fails with the abend code S322.

Default and overrides -

If TIME=NOLIMIT or TIME=1440 is coded at the job card, the system nullifies all TIME parameters on EXEC statements and the default TIME values. All steps within the job will have unlimited processor time.

If the TIME parameter is coded other than TIME=NOLIMIT or TIME=1440 at the job card, the system sets the time limit for each step as below -

  • If the step has TIME parameter, the system picks the smaller one among the step TIME parameter value and the time remaining from the job card TIME parameter value.
  • If the step has no TIME parameter, the system picks a smaller one among the system default time limit and the time remaining from the job card TIME parameter value.

Examples -


Scenario1 - TIME=1440 at the job level.

//MTHEXMP1 JOB (META007),'PAWAN Y',TIME=1140

The job can use the processor for 24 hours time.

Scenario2 - TIME with minutes and seconds at job level.

//MTHEXMP2 JOB (META007),'PAWAN Y',TIME=(9,30)

The job can use the processor for 9 minutes and 30 seconds.

Scenario3 - TIME with only seconds at job level.

//MTHEXMP3 JOB (META007),'PAWAN Y',TIME=(,45)

The job can use the processor for 45 seconds.

Scenario4 - TIME=MAXIMUM at job level.

//MTHEXMP4 JOB (META007),'PAWAN Y',TIME=MAXIMUM

The job can use the processor for 248.55 days (357912 minutes).

Scenario5 - TIME parameter at step level.

//MTHEXMP1 JOB (META007),'PAWAN Y',NOTIFY=&SYSUID
//STEP01   EXEC PRG=A,TIME=2

STEP01 can use the 2 minites of the CPU time.

Scenario6 - TIME parameter at job and step level.

//MTHEXMP1 JOB (META007),'PAWAN Y',TIME=8
//STEP01   EXEC PRG=A,TIME=2
//STEP02   EXEC PRG=B

According to the code, the job can run for 8 minutes, and STEP01 can run for 2 minutes. However, if STEP01 ends in 2 minutes, the maximum available time for STEP02 is 6 minutes (JOB TIME – STEP01 TIME, i.e., 8-2). Because there is no TIME parameter at STEP02.

Scenario7 - TIME parameter at JOB and EXEC statements.

//MTHEXMP1 JOB (META007),'PAWAN Y',TIME=8
//STEP01   EXEC PRG=A,TIME=2
//STEP02   EXEC PRG=B,TIME=3

According to the code, the job can run for 8 minutes, STEP01 can run for 2 minutes, and STEP02 can run for 3 minutes. However, if STEP01 ends in 2 minutes, the maximum available time for STEP02 is still 3 minutes because the system picks the smallest among 3 minutes(coded at STEP02) and 6 minutes (JOB TIME – STEP01 TIME, i.e., 8-2).