JCL

TIME parameter use & S322 Abend in JCL

TIME parameter specifies the maximum amount of time that step may use the processor or to find out through messages how much processor time a step used. It is an optional Keyword parameter & this is important to save MIPS(Million Instructions Per Second). This can be used either in JOB or in STEP or in both the places.

  • 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.

Time Parameter Defaults:

Each job step has a time limit. If you do not specify a TIME parameter on the JOB statement, the time limit for any job step is:

  • The value you specify for the TIME parameter on its EXEC statement, or
  • The default time limit (that is, the JES default job step time limit), if you do not specify a TIME parameter on its EXEC statement.

MIPS: It is a method of measuring the raw speed of the computer’s processor.

Syntax:

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

You can omit the parentheses if you code only 1440, 0, or the processor time in minutes.

Subparameter definition

minutes:  Specifies the maximum number of minutes the step or job can use the processor time. Valid values: 0 through 357912 (248.55 days).

seconds: Specifies the maximum number of seconds that the step can use the processor, in addition to any minutes that are specified. Valid values: 0 through 59.

1440 or NOLIMIT: Indicates that the step can use the processor for an unlimited amount of time. (“1440” literally means “24 hours.”)

Also code TIME=1440 or TIME=NOLIMIT to specify that the system is to allow this step to remain in a continuous wait state for more than the installation time limit, which is established through SMF.

MAXIMUM: Indicates that the step can use the processor for the maximum amount of time. TIME=MAXIMUM allows the step to run for 357912 minutes.

ZERO (0): Indicates that the step is to use the time remaining from the previous step. If the step exceeds the remaining time available, the step abnormally terminates.

TIME parameter Examples

Example-01

//STEP01 EXEC PGM=PGM01,TIME=(2,10)

Maximum amount of time the step can use the processor is 2 minutes, 10 seconds.

Example-02

//STEP02 EXEC PGM=PGM02,TIME=(,20)

Maximum amount of time the step can use the processor is 20 seconds.

Example-03

//STEP03 EXEC PGM=PGM03,TIME=25

Maximum amount of time the step can use the processor is 25 minutes.

Example-04

//STEP04 EXEC PGM=PGM04,TIME=NOLIMIT

This statement specifies that the step can have unlimited use of the processor. Therefore, the step can use the processor and can remain in a wait state for an unspecified period of time, if not restricted by the JOB statement TIME parameter.

Example-05

//STEP05 EXEC PROC=PROC01,TIME.STEP01=(45,30),TIME.STEP02=(10,20)

This statement calls cataloged or in-stream procedure PROC01. The statement specifies different time limits for each of the procedure steps: STEP01 and STEP02.

Example-06

//STEP06 EXEC PGM=PGM06,TIME=MAXIMUM

This statement specifies that the step can use the processor for 357912 minutes, if not restricted by the JOB statement TIME parameter.

Example-07

//JOB01 JOB MSGLEVEL=(1,1) 
//STEP1 EXEC PGM=PGM07,TIME=(,50) 
//STEP2 EXEC PGM=PGM08,TIME=0

STEP1 can use the processor for 50 seconds. If STEP1 actually uses the processor for only 40 seconds, STEP2 can use the processor for 10 seconds, because that is the time remaining from the previous step.

Example-08

//JOB02 JOB MSGLEVEL=(1,1),TIME=(,50)
//STEP1 EXEC PGM=PGM08,TIME=(,25)  
//STEP2 EXEC PGM=PGM09,TIME=(,40)
//STEP3 EXEC PGM=PGM10,TIME=0 

STEP1 can use the processor for 25 seconds. If STEP1 actually uses the processor for only 15 seconds, the time limit for STEP2 is the smaller of the following values:

  • The job time remaining (35 seconds)
  • The time limit specified on the EXEC statement for STEP2 (40 seconds).

In this case, the job time remaining is the smaller value, so STEP2 can use the processor for 35 seconds. If STEP2, then, actually uses the processor for only 30 seconds, STEP3 can use the processor for 5 seconds, because that is the time remaining from the previous step.

Example-09

//JOB03 JOB MSGLEVEL=(1,1),TIME=8,CLASS=5 
//STEP1 EXEC PGM=PGM09
//STEP2 EXEC PGM=PGM10

Assume that the default time limit for class 5 is 5 minutes. The time limit for STEP1 is 5 minutes (the default). If STEP1 actually uses the processor for 4 minutes, the time limit for STEP2 is the smaller of the following values:

  • The job time remaining (4 minutes)
  • The default time limit (5 minutes).

In this case, the job time remaining is the smaller value, so STEP2 can use the processor for 4 minutes.

Example-10

//JOB10 JOB MSGLEVEL=(1,1),TIME=8
//STEP1 ...TIME=5
//STEP2 ...TIME=5

Even though each step is allowed to use a maximum processor time of 5 mins, the whole job should complete with 8 mins as the JOB level parameter is set to 8 mins. If step1 completes in 5 mins and step2 in 5 mins then no issues. If step2 takes more than 5 mins the job fails at that step with S322.

Time Abend :

S322: Mßeans that the amount of Time which is allocated for this particular JCL has been exceeded.

Resolution: Increase the time limit or remove the parameter so that it uses the default values. Giving NOLIMIT or MAXIMUM also solves the issue but care should be taken while giving these options.

This can also be resolved by changing the CLASS parameter as well. For example if the given CLASS default value is 10 seconds and JCL executes more than 10 seconds then also it throws this error. In this case change the CLASS value by checking its default values.

Read JCL blogs : Click Here IBM Manual : Click Here

Admin

Share
Published by
Admin

Recent Posts

Increase Transparency and Collaboration Product Backlog

A well-maintained product backlog is crucial for successful product development. It serves as a single…

3 weeks ago

Product Backlog – Incremental value to the customer

Incremental value to the customer refers to the gradual delivery of small, functional parts of…

4 weeks ago

Product Market, Customer’s Desire, Need, and Challenges

A Product Market refers to the group of potential customers who might be interested in…

4 weeks ago

PAL-EBM Professional Agile Leadership – EBM Certification

The Professional Agile Leadership - Evidence-Based Management (PAL-EBM) certification offered by Scrum.org is designed for…

4 months ago

PAL I Professional Agile Leadership Certification

The Professional Agile Leadership (PAL I) certification, offered by Scrum.org, is designed to equip leaders…

4 months ago

Scrum Master Certification: CSM, PSM, SSM

Choosing the right Scrum Master Certification depends on your current experience and career goals. If…

6 months ago