Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to trace whether stored procedure in loop?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: How to trace whether stored procedure in loop?
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: Chennai

PostPosted: Mon Jan 05, 2009 4:45 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Mon Jan 05, 2009 9:33 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DUMP DATASETS VS TRACE DATASETS! lind sh CICS 4 Tue Dec 06, 2016 11:31 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us