MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to know which sql cause s322?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
issac1029
Intermediate


Joined: 10 Dec 2005
Posts: 159
Topics: 75

PostPosted: Thu Apr 27, 2006 1:02 am    Post subject: how to know which sql cause s322? Reply with quote

Quote:
322

Explanation: One of the following occurred:

O 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

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


That means one of my pgm cost a lot of resource,so how to check which sql code have problem?by program with out those tool such as QMF,because it did not be installed.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Apr 27, 2006 4:57 am    Post subject: Reply with quote

issac1029,


why do you think it is a sql that is causing the problem? Each Jobcalss has a time limit defined in your system. Make sure that you are running the job in the right class. Also check if your pgm is in an infinite loop.

Hope this helps...

Cheers

KOlusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
schintala
Beginner


Joined: 18 May 2005
Posts: 108
Topics: 31
Location: USA

PostPosted: Thu Apr 27, 2006 8:03 am    Post subject: Reply with quote

S322 code nothing to do with DB2 time. It depends job class defined in your shop. MVS cpu time is different from DB2 CPU time. If it all your SQL fails out of time resources, you will get corresponding SQL error code of -905.
Back to top
View user's profile Send private message
hariavinash
Beginner


Joined: 21 Jan 2005
Posts: 52
Topics: 7

PostPosted: Thu Apr 27, 2006 8:09 am    Post subject: Reply with quote

issac1029,

this is a timeout error. like Kolusu suggested check for possible program looping. another way to go about this is code a TIME parameter in your jcl/proc and rerun the job. if there is a TIME parameter give longer time and try out.

cheers
Back to top
View user's profile Send private message
issac1029
Intermediate


Joined: 10 Dec 2005
Posts: 159
Topics: 75

PostPosted: Mon May 08, 2006 1:26 am    Post subject: Reply with quote

1)
This problem has been solved by add one more constraint

key include a ,b,c:
a
b
c
d
e
f


my orginal sql:

select ...... from ..... where a=xx and c=xx

my new orginal sql:(it runs well)

select ...... from ..... where a =xx and c=xx and f='x'

I think it's because the num of record wihch satisfied the 'where' condition are too large.But some one told me that if one of the key(a,b,c) have not been defined in index also can cause timeout,I am confuse about that.

2)another question :If I define 'f' which is not a part of the unique key,if i use
Quote:

(select ...... from ..... where a =xx and c=xx and f='x')

whould more efficientive than the situation that I didn't define 'f' in index?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Mon May 08, 2006 3:45 pm    Post subject: Reply with quote

issac1029,

I am not very clear on your question, but if you mean to ask that defining a,b,c and f in a composite index would improve performance, then in your particular case (your SQL), YES...it would.

Regards,
Manas
_________________
There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948)
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group