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 

Finding COBOL-DB2 execution status

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


Joined: 04 Jan 2003
Posts: 24
Topics: 12

PostPosted: Sat Jan 04, 2003 5:39 pm    Post subject: Finding COBOL-DB2 execution status Reply with quote

Hi,
Can anyone let me know as how to find out for a COBOL-DB2 pgm (while in execution),which part of the program is in execution like is it in COBOL part or entered DB2 or where exactly it is and its status? Does Resource manager has anything to do with this?

Pls let me know..
Thanks,
ST

Question
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Sat Jan 04, 2003 6:28 pm    Post subject: Reply with quote

St,

If you have Omegamon at your shop , you can look at the status of your cobol-db2 execuetion.It shows the db2 statement execueting. If you dont have the tool then the simplest way is to put DISPLAY statements.

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ST
Beginner


Joined: 04 Jan 2003
Posts: 24
Topics: 12

PostPosted: Sun Jan 05, 2003 6:45 pm    Post subject: Reply with quote

Kolusu,

Thanks...

ST
Back to top
View user's profile Send private message
Vreddy
Beginner


Joined: 03 Feb 2003
Posts: 12
Topics: 5

PostPosted: Mon Feb 03, 2003 4:54 pm    Post subject: Reply with quote

Hi Kolusu,

I am using OMEGAMON, but is there any way to see whether the query is uising index or table scan.
_________________
Thanks
Vreddy
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Feb 03, 2003 9:04 pm    Post subject: Reply with quote

Vreddy,

You don't need to check omegamon ,you can use EXPLAIN to check if the query is using the index or is it going for a tablespace scan. The following is a simple example of settting up explain.I am assuming that you already have a plan_table. If you don't have then you can create one for your self. check the link given below for creating the plan table and how to intrepret the results from explain. code your program queries as shown below.


Code:


EXPLAIN PLAN SET QUERYNO = 1 
FOR SELECT * FROM
    TABLE
    WHERE COL1 = 'A'
    ORDER BY COL1 DESC   
    ;                 
EXPLAIN PLAN SET QUERYNO = 2 
FOR SELECT * FROM
    TABLE
    WHERE COL2 = 'B'
    ORDER BY COL2   
    ;                 



Now select from the plan_table for the explain on the above 2 queries.

Code:

SELECT *
      FROM
      PLAN_TABLE
      WHERE QUERYNO IN (1,2)
      ORDER BY QUERYNO, QBLOCKNO, PLANNO, MIXOPSEQ
      ;       


This will show the access method used and many other details. check this link for Using EXPLAIN to improve SQL performance

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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