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

How to trace whether stored procedure in loop?


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sudhee_rb

New User


Joined: 29 Mar 2006
Posts: 34

PostPosted: Mon Jan 05, 2009 4:05 pm
Reply with quote

Hi All,

Can anybody please let me know

How to trace if a DB2 stored procedure is in a loop?

One of my batch jobs is calling one DB2 stored procedures and it is running for a long time.

Thanks in advance.
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Mon Jan 05, 2009 4:45 pm
Reply with quote

How did you know that stored procedure is causing the loop?
Check,whether if the stored procedure is also being used by some other program?
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Mon Jan 05, 2009 4:49 pm
Reply with quote

Give a display statement in the main para. Check it in spool.


For displaying in spool, you should have
Code:
PROCESS OUTDD(progname)
in the begining of the code.

Check the WLM job that runs the stored proc.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jan 05, 2009 9:33 pm
Reply with quote

Hello,

Quote:
One of my batch jobs is calling one DB2 stored procedures and it is running for a long time.
This is most often caused by poor table design, poor sql design, or trying to process an unreasonable amount of data in a single query. Some very innocent-looking code can drain even a very large system.

What does this stored procedure do?
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
This topic is locked: you cannot edit posts or make replies. REXX - Do - Not able to LOOP CLIST & REXX 10
No new posts XL C Trace Preprocessor Output All Other Mainframe Topics 3
No new posts step by step trace 4 ISPF dialog call... TSO/ISPF 17
No new posts Invoke stored procedure via batch JCL. DB2 2
Search our Forums:

Back to Top