DB2 Plan accessed

How can i view the DB2 PLAN accessed by my NATURAL Programs of our application in the CICS region.
( Even I have no idea of the transid used to invoke the NATURAL from the CICS region )

I am not familiar with Natural for DB2, but wouldn’t the explain plan be something DB2 would have to figure out, not Natural?

Therefore, there should be some kind of DB2 tool that will tell you for a given SQL string what the explain plan is, just as Oracle’s OEM does the same.

Natural for DB2 provides many tools to work with DB2. There is an Explain PLAN_TABLE function: http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat426mf2/dbms/ndb-explain.htm#ndb-explain.

Please see the Natural for DB2 documentation for details on what is available to support DB2: http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat426mf2/dbms/db2-over.htm#db2-over

Without knowing the CICS transaction, I’m not sure how you could find out the plan. The plan is set through a DB2Entry in the CICS tables (along with DB2Tran and DB2Conn) and is tied to the CICS transaction. If all of your Natural programs are using the same CICS transaction, I guess you could browse through the entries in CEMT and try to determine which is the one for Natural.

In DB2, you might try browsing the SYSIBM.SYSPLAN table for a likely candidate.

But somebody in your organization had to set this up, like your systems programmers or Natural administrators. Have you asked them?


I tried using the EXPLAIN PLAN_TABLE option from SYSDB2 .
It is showing the error like :

Explanation Table QPINC.PLAN_TABLE does not exist.

And also we checked with the Natural sytem administrator .They are telling like it is application related and they are not that helpful.

In our application , in one CICS region (cprd008) , we have Development , testing , acceptance testing , maintainance regions
And from the SYSIBM.SYSPLAN table we can see so many plans for each region .So out of all these plans which is the one used by the programs in each region.

Can anyone please clarify my doubt