JCL EXEC TIME

JCL - EXEC PROC JCL - DD Statement

Advertisements


TIME parameter specifies the maximum amount of time that step may use the processor.

In other words, TIME specifies the maximum CPU usage time allowed for the step to execute.

TIME parameter is optional parameter.

TIME parameter can be coded at the JOB level and step level too.

System will automatically cancel the JOB execution, if the execution time reaches to the TIME specified.

In other words, TIME parameter will notify the maximum CPU utilization time to OS and once the specified time utilized by the job, OS will automatically cancel the job.

If TIME parameter not specified, then the default value is 1440 min/24 Hours/1 day.

Default time in TIME parameter can vary system to system based on installation/setup.

If the TIME parameter value is less than the default value from the system installation, TIME parameter can be used on JOB statement.

If the TIME parameter value is greater than the default value from the system installation, TIME parameter can’t be used on JOB statement.

If the TIME parameter value is greater than the default value from the system installation, TIME parameter can be used on EXEC statement.


Syntax:

TIME[.procstepname]=   {([minutes][,seconds])}
                       {1440                 }
                       {NOLIMIT              }
                       {MAXIMUM              }
                       {0                    }

NOLIMIT or 1440:

NOLIMIT or 1440 Minutes values are almost functionally same.

Both specify that the step can use the processor for unlimited time.

In other words, both assign unlimited time for the step execution.

1440 means 24 hours.

If NOLIMIT or 1440 Minutes specified at JOB card level, all TIME parameters specified at step level will be overwritten.

If NOLIMIT or 1440 coded, the system will allow waiting the particular JOB step more than the default time specified during the system installation.


MAXIMUM:

Specifies the step can use the processor for the maximum amount of time.

If MAXIMUM coded in TIME parameter, step can use 248.55 days (357912 minutes) processor time.


Minutes:

Specifies the step can use the processor for the maximum amount of minutes.

Minutes must be a number from 0 through 357912 (248.55 days).

Any number between 0 through 357912 (248.55 days) should be coded with TIME parameter, the system allows that many minutes to use the processor.

If ZERO specified in TIME parameter, it may produce unpredictable results.


Seconds:

Specify the step can use the processor for that many seconds in addition to the minutes specified.

Seconds always specifies along with the Minutes.

Seconds must be a value in between 0 to 59 seconds.


Note:

If the TIME provided in step is not sufficient to execute, then JOB will fail with the abend code S322.


Defaults:

If TIME parameter not specified on the JOB statement, the time limit for each job step is:


  • EXEC statement TIME parameter value
  • The default time limit, if not specified on EXEC statement.

Overrides:

If the JOB statement TIME parameter coded as TIME=NOLIMIT or TIME=1440, the system nullifies any TIME parameters on EXEC statements as well as the default TIME values.

All steps within the job will have unlimited processor time.


If the JOB statement TIME parameter coded other than TIME=NOLIMIT or TIME=1440, the system sets the time limit for each step as below.


  1. If the EXEC statement TIME parameter coded, system will pick smaller one among EXEC statement TIME parameter value and the time remaining after execution of previous steps from JOB statement TIME parameter value.

  2. If the EXEC statement TIME parameter not coded, system will pick smaller one among default time limit value and the time remaining after execution of previous steps from JOB statement TIME parameter value.

Example 1:

//STEP01 EXEC PGM=SAMPLE,TIME=1140

In the above example, the TIME statement can specify that the step can use the processor for unlimited time.


Example 2:

//STEP01 EXEC PGM=SAMPLE,TIME=(9,30)

In the above example, the TIME statement can specify that the step can use the processor for 9 minutes and 30 seconds.


Example 3:

//STEP01 EXEC PGM=SAMPLE,TIME=(,45)

In the above example, the TIME statement can specify that the step can use the processor for 45 seconds.


Example 4:

//STEP01 EXEC PGM=SAMPLE,TIME=MAXIMUM

In the above example, the TIME statement can specify that the step can use the processor for 248.55 days (357912 minutes).


Example 5:

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

In the above example, the STEP01 should complete in 2 minutes as the minimum of 6 and 2 is 2.

STEP02 should complete in 4 minutes max as the minimum of 6 and 4 (JOB TIME value – STEP01 TIME value) is 4.

If any of the above step executing beyond the time calculated, then the job will terminates abnormally.


Example 6:

//STEP01 EXEC PROC=MTHPROC,TIME.STEP02=(9,30)

This EXEC statement calls the cataloged or instream proc MTHPROC. TIME.STEP02 specifies that the step STEP02 in the MTHPROC can use the processor for 9 minutes and 30 seconds.


Example 7:

//MTHEXMP1 JOB (META007),'PAWAN Y'
//STEP01   EXEC PROG=A,TIME=20
//STEP02   EXEC PROG=B,TIME=0

In the above example, the STEP01 can use 20 minutes of processor time. Let us assume STEP01 completes in 10 minutes.

STEP02 can use the remaining 10 minutes of processor time as STEP02 do not have any minutes.


JCL - EXEC PROC JCL - DD Statement

Advertisements