View previous topic :: View next topic |
Author |
Message |
issac1029 Intermediate

Joined: 10 Dec 2005 Posts: 159 Topics: 75
|
Posted: Thu Apr 27, 2006 1:02 am Post subject: how to know which sql cause s322? |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Apr 27, 2006 4:57 am Post subject: |
|
|
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 |
|
 |
schintala Beginner
Joined: 18 May 2005 Posts: 108 Topics: 31 Location: USA
|
Posted: Thu Apr 27, 2006 8:03 am Post subject: |
|
|
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 |
|
 |
hariavinash Beginner
Joined: 21 Jan 2005 Posts: 52 Topics: 7
|
Posted: Thu Apr 27, 2006 8:09 am Post subject: |
|
|
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 |
|
 |
issac1029 Intermediate

Joined: 10 Dec 2005 Posts: 159 Topics: 75
|
Posted: Mon May 08, 2006 1:26 am Post subject: |
|
|
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 |
|
 |
Manas Biswal Intermediate

Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Mon May 08, 2006 3:45 pm Post subject: |
|
|
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 |
|
 |
|
|