JCL TIME Parameter
JCL Time parameter is optional Keyword parameter. The amount of CPU Time a job or a step is allowed to use is controlled using the Time parameter and this is important to save MIPS(Million Instructions Per Second).
What is MIPS?
MIPS is Million Instructions Per Second. It is a method of measuring the raw speed of the computer’s processor.
The Syntax of TIME Parameter:
Here, MIN -> Minutes and SEC -> Seconds
Example to code TIME Parameter at JOB Level
In this example, we have TIME=(10,20) which means this job has a maximum execution time of 10 minutes and 20 seconds.
Example to code TIME Parameter at STEP Level(EXEC)
In this example, we have TIME=(4,8) which means this step has a maximum execution time of 4 minutes and 8 seconds.
Example of a JCL with TIME parameter coded at JOB and STEP Level
In this example, TIME allocation is –
- At JOB Card – TIME=(10,20)
- STEP10 – TIME=(4,8)
- STEP20 – TIME=(8,5)
a) Entire JOB can run for a maximum time of 10 minutes and 20 seconds.
b) STEP10 can take a maximum of 4 minutes and 8 seconds out of the entire 10 minutes and 20 seconds
-> So, what is the maximum Execution Time for STEP20?
STEP20 can run for a maximum of 6 minutes and 12 seconds(Not 8 minutes and 5 seconds) because of the below reasons
- Maximum Time for JOB = 10 Minutes and 20 Seconds
- And the Maximum Time for STEP10 = 4 Minutes and 8 seconds(Out of 10 minutes and 20 seconds)
- Maximum Time for STEP20 will be calculated as – (10 Minutes 20 Seconds – 4 Minutes and 8 Seconds) = 6 Minutes and 12 Seconds.
So, it is important to subtract TIME at STEP10 from TIME available for the entire JOB.
The answer to this question is -
The TIME parameter at STEP20 restricts it to run for a maximum of 8 Minutes and 5 Seconds but we are calculating the worst case scenario. This means that we should always think that, if the previous step ran for a maximum amount of time, then what is the maximum amount of CPU time which is left for the subsequent steps. This method is important to avoid any miscalculation.
Other important options for TIME Parameter
This means that there is no Time limit for this particular job or step.
It allows a job or a step to use the maximum amount of CPU Time. In most of the Mainframe Machine configurations, it allows a job or a step to run for almost 357912 minutes which is approximately two hundred and forty-eight days.
What Abend you will get if you code improper TIME Parameter?
If your job is not able to complete in 10 minutes and 20 seconds then the system will throw an Abend(Abnormal Termination) and most of the time, you will get S322 Abend.
S322 Abend means that the amount of Time which is allocated for this particular JCL has been exceeded.