IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Finding all programs under a given Plan


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
tetrion

New User


Joined: 22 May 2005
Posts: 8

PostPosted: Fri Jun 09, 2006 2:55 pm
Reply with quote

Hi All,
Can somebody tell me if there is a way to find all the programs under a given PLAN name.

Thank you
Back to top
View user's profile Send private message
anamikak

New User


Joined: 10 May 2006
Posts: 64
Location: Singapore

PostPosted: Tue Jun 13, 2006 3:51 pm
Reply with quote

step1/

try this sql query in QMF or in DB2I

SELECT PLANNAME,COLLID,

FROM SYSIBM.SYSPACKLIST

WHERE PLANNAME ='YOUR PLAN NAME'

you will be able to see a list of collection ids to which your packages are bound.

after this you could follow either of the steps below.


step2A/


If you have BMC Db2 installed. you could selct the option of querying Db2 objects. In the object select the collection option and give the list of collections one after the other. This would give you the list of packages, having got the list of packages, query db2 for object as package, you woul get DBRMs So, the DBRMS are your db2 program names.


Step2B/


Try this sql query in QMF or in DB2I

ELECT A.NAME,B.NAME

FROM SYSIBM.SYSPACKAGE A,
SYSIBM.DBRM B

WHERE A.NAME IN ( list of collections ids )
and A.CONTOKEN = B.TIMESTAMP


here a.name refers to package name bound to the collection list AND B.name refers to Dbrms wich are your Db2 program.



OR, in a nutshell, the two queris can be combined as

SELECT A.NAME,B.NAME

FROM SYSIBM.SYSPACKAGE A,

SYSIBM.DBRM B

WHERE A.NAME IN ( SELECT COLLID

FROM SYSIBM.SYSPACKLIST C

WHERE C PLANNAME ='YOUR PLAN NAME' )

and A.CONTOKEN = B.TIMESTAMP
----------------------------------------------------------------------------------

now another consideration is when DBRMs are directly bound to your plan, ie there is no package bind. In such cases if you know your plan name, you can directly query SYSIBM.DBRM as

SELECT NAME FROM SYSIBM.DBRM
WHERE PLNAME = 'plan name'


The name that you get from this query refer to your db2 program.



Hope these methods help you.

Anamika

[/i]
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts VB to FB - Finding LRECL SYNCSORT 4
No new posts Fetch data from programs execute (dat... DB2 3
No new posts Passing Parameters to Programs Invoke... PL/I & Assembler 5
No new posts Finding Assembler programs PL/I & Assembler 5
Search our Forums:

Back to Top