View previous topic :: View next topic
|
Author |
Message |
Mayos
New User
Joined: 11 Apr 2005 Posts: 16
|
|
|
|
Hello,
Any suggestions on how to fix an s322 Abend Code in JCL?
Thanks. |
|
Back to top |
|
|
David P
Active User
Joined: 11 Apr 2005 Posts: 106 Location: Cincinnati Ohio
|
|
|
|
Hi,
Please check the time parameter coded in your Job or step level.
Reason for S322:
The CPU time limit specified in the JCL has been exceeded.
The default CPU time limit set by the system has been exceeded.
Common Scenarios
Long-running programs: Programs that process a large amount of data or have inefficient code.
Infinite loops: Logic errors in the program that cause it to run indefinitely.
How to Resolve S322 Abend
Increase CPU Time Limit:
If the job genuinely requires more CPU time, increase the time limit on the JOB or EXEC statement.
Example:
Code: |
//JOBNAME JOB (ACCOUNTING_INFO),'JOB DESCRIPTION',
// TIME=10,CLASS=A,MSGCLASS=X
//STEP1 EXEC PGM=YOURPROGRAM,REGION=0M,TIME=(,20) |
Optimize Program Performance:
Review and optimize the code to reduce CPU usage.
Look for inefficiencies or infinite loops that might be causing excessive CPU consumption.
Check for Infinite Loops:
Ensure the program logic does not have infinite loops or conditions that prevent it from completing in a reasonable time.
Use System Override:
If system policies allow, you can request a temporary override for the CPU time limit from your system administrator.
regards,
David. |
|
Back to top |
|
|
aishwarya_singh
New User
Joined: 06 Apr 2005 Posts: 21
|
|
|
|
This Abend occurs whenever there is Time spent in running the job is out of the CPU Time whichin which actually the job should have run. |
|
Back to top |
|
|
Mayos
New User
Joined: 11 Apr 2005 Posts: 16
|
|
|
|
Does this mean that I have to increase my time parameter?
Thanks again. |
|
Back to top |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
If the time parameter provided in the job or in step is correct then the reason can be due to improper compilation.
Find out in which program the job gave s322 error.
Try to recompile the program and make the job run. |
|
Back to top |
|
|
learnmf
Active User
Joined: 14 Mar 2005 Posts: 123
|
|
|
|
S322
The system took a longer time to run a job, job step, or procedure than the time specified in one of the following:
- The TIME parameter of the EXEC or JOB statement
- The standard time limit specified in the job entry subsystem
/references/a29.html |
|
Back to top |
|
|
somasundaran_k
Active User
Joined: 03 Jun 2003 Posts: 134
|
|
|
|
Mayos
If it's not the problem with the TIME parameter check whether your program is running in an infinite loop, for example a PERFORM UNTIL condition.
Regds
-Som |
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 63
|
|
|
|
Hi,
Jus to ad to the info...Is the TIME parameter mandatory...wht does it signify exactly |
|
Back to top |
|
|
uma
New User
Joined: 18 Mar 2005 Posts: 8
|
|
|
|
hi...
I guesst time parameter is not mandatory.But sometimes when the job runs for a longer period then this problem occurs.This can be corrected by coding TIME=1440 in the job card area.
cheers,
Uma |
|
Back to top |
|
|
learnmf
Active User
Joined: 14 Mar 2005 Posts: 123
|
|
|
|
[quoteHi,
Jus to ad to the info...Is the TIME parameter mandatory...wht does it signify exactly[/quote]
Hi Friend The time parameter is not mandatory.If you can't give it takes the default.
thanks
Chandra |
|
Back to top |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
hi frnd,
S322 error is caused when CPU time assigned to the job, job step or procedure has been exceeded..
so to fix the error u can just go for some looping or u can go for some mismatching time parameter.. to solve go in reverse order. |
|
Back to top |
|
|
Kavitha Palani
New User
Joined: 16 Nov 2005 Posts: 8
|
|
|
|
Indicates a time out abend. Your program has taken more CPU time than the default limit for the job class. Could indicate an infinite loop. |
|
Back to top |
|
|
kanak
Moderator
Joined: 12 Mar 2005 Posts: 252 Location: India
|
|
|
|
As per my manual:
One of the following occurred:
1. The system took a longer time to run a job, job step, or procedure than the time specified in one of the following:
- The TIME parameter of the EXEC or JOB statement
- The standard time limit specified in the job entry subsystem
2. For a started task under the master subsystem, the TIME parameter was not specified on the PROC statement of the catalogued procedure, and the PPT entry did not indicate a system task.
System Action: The system abnormally ends the job, job step, or procedure.
Programmer Response: If the TIME parameter was not specified on the PROC statement of the catalogued procedure, add the TIME parameter or add a PPT entry for the PGM parameter. Otherwise, check for program errors. If none exist, specify a longer time in the TIME parameter. Then run the job again. |
|
Back to top |
|
|
Phantom
New User
Joined: 04 Sep 2005 Posts: 25
|
|
|
|
Pals,
I am consolidating everyone's note here.
1. S322 - Time out Abend - program exceeds the CPU time limit provided to your job. This could be due to various reasons.
Code: |
a. Infinite loop in the program
b. Reads database / tape which consume more cpu time.
c. Processing huge input files
|
2. To avoid S322 you can do the following.
Code: |
a. Increase the TIME parameter. In some shops, TIME parameter is strictly not allowed.
b. If you can't provide TIME parameter, then find out the CLASS which has more CPU time. Normally, in any shop, there will be different initiators (nothing but Job CLASS) and each initiator has a purpose.
1. Certain initiators have large CPU time (for long running jobs)
2. Some initiators have less CPU time (for short jobs)
3. Some intiators are dedicated for transfers like (FTP, NDM ....)
4. Some initiators are dedicated for DB2 / IMS sub-systems...
So, talk to your System programmers and find out the job CLASS which has highest CPU time limit and use that to run your job. It will never end in S322 (provided your program does n't have an infinite loop).
|
Hope this helps,
Thanks,
Phantom |
|
Back to top |
|
|
Balasubramanian
New User
Joined: 23 Apr 2005 Posts: 13 Location: Bangalore
|
|
|
|
Hi,
Try to change CLASS parameter at JOB card, that might help some time.
Regards,
Balasubramanian S |
|
Back to top |
|
|
mandyamj
New User
Joined: 22 Nov 2005 Posts: 7
|
|
|
|
Reason: Caused when CPU time assigned to the job, job step or procedure has been exceeded
JOB OR STEP TIME EXCEEDED THE SPECIFIED LIMIT PROGRAM IS IN A LOOP INSUFFICIENT TIME PARAMETER ON JOB OR EXEC CARD
1.check this job is depend on any previous job if so check that job
2.program may be running in infinite loop
3.give the maxium time limit |
|
Back to top |
|
|
tspr52
New User
Joined: 12 Sep 2006 Posts: 31 Location: Madrid, Spain
|
|
|
|
Code: |
//UMDO0031 JOB (ACCOUNT),UMDO003, ** REPORT
// CLASS=B,REGION=0M,NOTIFY=UMDO003,
// MSGCLASS=W,TIME=1440 |
Like this |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
I think the point which many people are trying to make here is - What is happening in the program, rather than let's give it infinite resource.
The OP has not bothered to respond to much in this thread.
In my view, giving him/her the code to use infinite resource is a gross error of judgement until the OP has confirmed that the program is working as expected.
I have experienced one user who submitted a looping program on Friday afternoon, who on return to work the next Tuesday found his job was still running and had produced zero results. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Even if it might be gotten away with, 1440 should NOT used.
NO 'application code' should ever specify 1440. Fortunately, many data centers automatically flush application jobs with 1440 in the jcl. |
|
Back to top |
|
|
tspr52
New User
Joined: 12 Sep 2006 Posts: 31 Location: Madrid, Spain
|
|
|
|
You are right.
This example is just to be used only if you are sure your program is running ok, and only is "exhausted"
For example, if you are running ISRSUPC with a lot of parameters.
My excuses,
Jose Luis |
|
Back to top |
|
|
pavanbolla
New User
Joined: 25 Mar 2007 Posts: 7 Location: Canada
|
|
|
|
Hi,
Check whether the COBOL program is in infinite loop, if it is not increase the TIME parameter. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
To repeat - SUPERC or your own program or a sort or anything else that is a submitted batch job should not specify 1440.
It does not matter if the job is "running OK". 1440 is a bad option.
If there is a business requirement to use a very large amount of cpu cycles, most sites have some number of initiators/classes that are defined with sufficient time.
If this is a test, needing 1440 is just sloppy or lazy or both. There are ways to cut down the size of the "compare" or other test. Unfortunately, for some, they require a little bit of work and/or planning. |
|
Back to top |
|
|
shagnwrx
New User
Joined: 07 Jul 2006 Posts: 17 Location: Birmingham, AL
|
|
|
|
I'd first check to see how many cpu seconds you are consuming. As the others have said either infinite loop, or you have this job in the wrong jobclass (Sys Progs set CPU time limits per class).
Chances are, there is a list around your shop that shows the time limits for each class.
For right now, do not run unlimited timed initiators, as you've not determined if you have a hard loop yet. Maybe go to a class that is another 30 seconds to a minute longer than the class you are running in now. |
|
Back to top |
|
|
sril.krishy
Active User
Joined: 30 Jul 2005 Posts: 183 Location: hyderabad
|
|
|
|
A small note on S322 error:
If the problem is repeating after the increase of the TIME parm,please check the EXCEPTION count,If the count is not increasing ,it means that job is in loop.Try to fix the loop problem,then your problem is solved.
We generally check the Exception count for longer running jobs during the production support to make sure that cycle won't run much time which in turn helps to keep the onlines up at the given time.
Thank you
Krishy. |
|
Back to top |
|
|
S0C7
New User
Joined: 19 May 2006 Posts: 26
|
|
|
|
All,
Just curious on why we are specifying 1440. There is an option call NOLIMIT. Is 1440 same as NOLIMIT..? |
|
Back to top |
|
|
|