View previous topic :: View next topic |
Author |
Message |
ST Beginner
Joined: 04 Jan 2003 Posts: 24 Topics: 12
|
Posted: Sat Jan 04, 2003 5:39 pm Post subject: Finding COBOL-DB2 execution status |
|
|
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
|
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Sat Jan 04, 2003 6:28 pm Post subject: |
|
|
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 |
|
|
ST Beginner
Joined: 04 Jan 2003 Posts: 24 Topics: 12
|
Posted: Sun Jan 05, 2003 6:45 pm Post subject: |
|
|
Kolusu,
Thanks...
ST |
|
Back to top |
|
|
Vreddy Beginner
Joined: 03 Feb 2003 Posts: 12 Topics: 5
|
Posted: Mon Feb 03, 2003 4:54 pm Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Mon Feb 03, 2003 9:04 pm Post subject: |
|
|
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 |
|
|
|
|