DB2 interview question for plan or package



IBM's flagship relational database management system

DB2 interview question for plan or package

Postby tjegan » Mon Jun 29, 2015 5:06 pm

Hi,

How to check whether the COBOL-DB2 program uses Package or Plan ?
Can anyonne let me know whether we need to check the catalog tables?
tjegan
 
Posts: 33
Joined: Mon Mar 25, 2013 5:58 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DB2 interview question for plan or package

Postby alexm » Mon Jun 29, 2015 7:17 pm

Hi tjegan,

starting with DB2 10 for z/OS, DBRMs are no longer bound into a plan; the DB2 plan points to a (list of) collection id(s) that, after a successful package bind, contain the questionable DB2 package.

So if your program source code contains any SQL statements, then it's intent is most likely to access DB2 data. During your program compile process, the DB2 precompiler/coprocessor has then, in most cases, created a DBRM, and that DBRM should have been bound to become a DB2 package. Some specific tables of the DB2 catalog can then be queried to find the DB2 package.

To understand this process in more details, you may have a look at chapter Preparing an application to run on DB2 for z/OS in the Application Programming and SQL Guide. Additionally, there's this famous DB2 (V9) redbook DB2 9 for z/OS: Packages Revisited to find plenty of information related to plans and packages.

Best regards,
alexm
User avatar
alexm
 
Posts: 35
Joined: Wed Oct 13, 2010 6:40 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DB2 interview question for plan or package

Postby pranav283 » Mon Jul 20, 2015 12:38 pm

Hi tjegan,

Check the following catalog tables:

1. SYSIBM.SYSPACKDEP - for dependencies with pakage
2. SYSIBM.SYSPLANDEP - for dependencies with plan
pranav283
 
Posts: 47
Joined: Sat Aug 30, 2014 3:52 pm
Has thanked: 2 times
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post