Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Finding all programs under a given Plan

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Finding all programs under a given Plan
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts User exit in COBOL programs ganasrinivasan PL/I & Assembler 0 Thu Aug 18, 2016 12:48 pm
No new posts "DFSRRC00 vs IKJEFT01" for ... arunsoods All Other Mainframe Topics 5 Fri Aug 12, 2016 9:54 pm
No new posts Finding unreferenced datasets without... Alan Playford JCL & VSAM 5 Tue Jul 12, 2016 9:07 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us