IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to fix S322 Abend?


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shan

New User


Joined: 10 Aug 2006
Posts: 7

PostPosted: Thu Aug 31, 2006 8:49 pm
Reply with quote

When i tried running a job, it gave Abend S322.
It is a time Abend.

First time i ran the job, all the parameters of the job card were given 1 line ( Shown below)
Code:

//PSE0xxxx JOB 0QNF0000,LOAD Sxx,MSGLEVEL=(1,1),MSGCLASS=Q,CLASS=2


The second time i mentioned all the parameters in the job card in 3 lines and the job ran fine.(shown below)
Code:
//PSE0xxxx JOB 0QNF0000,'FILE LOAD xxx ',
//         CLASS=2,                           
//         MSGCLASS=Q   


Could you please let me know why the job failed with S322 Abend the first time but ran fine the next time?

Thanks,
Shan
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Thu Aug 31, 2006 9:00 pm
Reply with quote

A S322 abend is related to exceeding the amount of CPU time the job or job step can use. If you have no TIME= parameter on the JOB card or the EXEC cards, the system may have a default for the amount of CPU your job can used.

You could run the same job 10 times and you may find the amount of CPU used by the jobs are rarely exactly the same. You may have just exceeded the threshhold with one job and may have been under the threshhold on the other job.

You could code TIME=1440 on the JOB card or the EXEC card to prevent the S322 abend.
Back to top
View user's profile Send private message
shan

New User


Joined: 10 Aug 2006
Posts: 7

PostPosted: Fri Sep 01, 2006 9:52 am
Reply with quote

Hi,

Could you please let me know what is the significance of giveng "TIME=1440" in the job card or the EXEC ?

What does that 1440 indicate ?

Could you also calerify me the following doubt too ?
So this S322 Abend is no way related to placing the parameters of the job card in one line or in 3 separate lines.


Thanks,
Shan
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Fri Sep 01, 2006 10:34 am
Reply with quote

Shan,

Quote:
Could you please let me know what is the significance of giveng "TIME=1440" in the job card or the EXEC ?

TIME Parameter at JOB Card or EXEC Step Card gives a maximum amount of time that job or step is allowed to use CPU Time for.
Quote:
What does that 1440 indicate ?

It means your job can use the CPU Time of maximum 1440 minutes.
Quote:
So this S322 Abend is no way related to placing the parameters of the job card in one line or in 3 separate lines.

No, Its not.

For complete information on TIME parameter visit manuals...
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Fri Sep 01, 2006 11:21 am
Reply with quote

HI,

Specifing TIME=1440 ensures the job gets unlimitted CPU time and exempted from waiting time.

~Vamsi
Back to top
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Fri Sep 01, 2006 2:20 pm
Reply with quote

Hi shan,


Quote:

Could you please let me know why the job failed with S322 Abend the first time but ran fine the next time?


In the above 2 job cards CLASS parameter is changed from "Q" to "2".
This makes change in Time.

you can know which CLASS takes how much time with TSO command.
that is "TSO JOBCLASS". Type this at your command prompt.

Here you will get all CLASSES which are defined in your mainframe shop.
There Time is also defined(CPU TIMEOUT LIMITS) for each CLASS . Even if you use TIME=1440 with CLASS=Q, TIME will be overridden with defined time.

So checkout the TIME in your CLASS definitions and use the required CLASS for your job. This avoids S322 abends.
Back to top
View user's profile Send private message
stly
Warnings : 1

New User


Joined: 25 Jul 2005
Posts: 93

PostPosted: Fri Sep 01, 2006 2:24 pm
Reply with quote

Hi surya,

good concept got from u.

The S322 abend typically indicates a timeout or job step exceeding the time limit allocated for its execution. Here's a more detailed explanation and steps to resolve it:

Understanding S322 ABEND:

Timeout or Time Limit Exceeded:
The S322 abend occurs when a job step exceeds the maximum CPU time or elapsed time allocated for its execution.

Batch Job Execution:
In a batch processing environment, jobs and job steps are allocated specific time limits to complete their processing tasks.

Job Scheduler Considerations:
Job schedulers, such as JES2 or JES3, enforce these time limits to prevent jobs from monopolizing system resources and to ensure fair resource allocation among multiple jobs.

Causes of S322 ABEND:

Long-Running Job Steps:
The most common cause is a job step taking longer than the allocated time due to extensive processing, large data volumes, or inefficient program logic.

Resource Contention:
Resource contention with other jobs or system activities may also contribute to job steps exceeding their time limits.

Incorrect Job Scheduling:
Incorrect scheduling parameters or insufficient time allocation in job submission can lead to S322 abends.

Steps to Resolve S322 ABEND:

Review Job Step Execution Time:
Analyze the job step's processing logic and data volume to identify areas where execution time can be optimized.

Optimize Program Logic:
Review and optimize the COBOL or program logic to reduce processing time and improve efficiency.

Data Volume Considerations:
If dealing with large data volumes, consider optimizing data access methods, using appropriate indexing, and batch processing techniques.

Resource Management:
Coordinate with system administrators or operators to ensure sufficient system resources (CPU, memory, I/O) are available for job execution.

Job Scheduler Parameters:
Verify and adjust job scheduler parameters, such as time limits (TIME parameter) and priority settings, as needed.

Batch Monitoring and Alerts:
Implement batch job monitoring and alert mechanisms to proactively identify and address jobs nearing their time limits.

Performance Tuning Tools:
Utilize performance tuning tools and utilities provided by the mainframe environment (such as RMF, SMF, or third-party tools) for detailed analysis and optimization.

Testing and Validation:
Test job execution scenarios in a controlled environment to validate changes and ensure that job steps complete within the allocated time.
Back to top
View user's profile Send private message
shefu_sarandha

New User


Joined: 30 Aug 2006
Posts: 5
Location: newark, de

PostPosted: Fri Sep 01, 2006 7:48 pm
Reply with quote

Do we need any specific user id to run the command TSOCLASS. Its not working for me.
Back to top
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Thu Sep 07, 2006 10:14 am
Reply with quote

Shefu,

"Jobclass" is the TSO command. I think it should work everywhere.

I feel you are using "CLASS" only. Use TSO JOBCLASS at command prompt.
Back to top
View user's profile Send private message
balajiofcrrcoe

New User


Joined: 07 Jul 2005
Posts: 41
Location: chennai

PostPosted: Thu Sep 07, 2006 10:31 am
Reply with quote

I tried issuing the command "TSO JOBCLASS" at command prompt
But could see the tso message

IKJ56500I COMMAND JOBCLASS NOT FOUND
***
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Thu Sep 07, 2006 10:36 am
Reply with quote

hi,

The command JOBCLASS should be Shop Specific.
Back to top
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Thu Sep 07, 2006 11:01 am
Reply with quote

Hi Sree,

May be this is shop specific.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Thu Sep 07, 2006 4:55 pm
Reply with quote

In your first message you said:
Quote:
//PSE0xxxx JOB 0QNF0000,LOAD Sxx,MSGLEVEL=(1,1),MSGCLASS=Q,CLASS=2

There are no quotes around the LOAD Sxx words.
Is that a typo?
If not, it means that the job ran with the following JOB card:
//PSE0xxxx JOB 0QNF0000,LOAD
All the rest being considered as a comment.
That could explain the difference!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts Call an hlasm from REXX in batch and ... CLIST & REXX 4
No new posts What is the most complex abend you've... Mainframe Interview Questions 8
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts WER999A - UNSUCCESSFUL SORT 8ED U Ab... SYNCSORT 5
Search our Forums:

Back to Top