Page 1 of 1

DB2 interview question for plan or package

PostPosted: Mon Jun 29, 2015 5:06 pm
by tjegan
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?

Re: DB2 interview question for plan or package

PostPosted: Mon Jun 29, 2015 7:17 pm
by alexm
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

Re: DB2 interview question for plan or package

PostPosted: Mon Jul 20, 2015 12:38 pm
by pranav283
Hi tjegan,

Check the following catalog tables:

1. SYSIBM.SYSPACKDEP - for dependencies with pakage
2. SYSIBM.SYSPLANDEP - for dependencies with plan