Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Query to list packages bound under a plan

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Wed Jul 03, 2013 2:06 pm    Post subject: Query to list packages bound under a plan
Reply with quote

Hi,

Can you please help me with the query to list the packages bound under a particular plan?

Input should be plan name and it should list all the packages dependent on that plan with version number also.

Thanks in advance.
Back to top
View user's profile Send private message

xknight

Active User


Joined: 22 Jan 2008
Posts: 117
Location: Liberty city

PostPosted: Wed Jul 03, 2013 4:06 pm    Post subject:
Reply with quote

Hello,

Have you tried this

Code:
SELECT * FROM SYSIBM.SYSPACKAGE     
WHERE NAME = 'PGMNAME' WITH UR;;;;
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Wed Jul 03, 2013 4:30 pm    Post subject:
Reply with quote

I want to get list by Plan name.

I tried the below query but its giving me -132 sqlcode, as I am not able to append '%' sign correctly.

Code:

  SELECT A.PLANNAME,
         B.COLLID,
         B.NAME,
         B.VERSION,
         B.CONTOKEN,
         B.TIMESTAMP,
         B.BINDTIME,
         B.VALID,
         B.OPERATIVE
  FROM SYSIBM.SYSPACKLIST A,SYSIBM.SYSPACKAGE B, (SELECT '%%' as col1 from sysibm.sysdummy1) C
  where A.PLANNAME = 'PLAN01'
  and B.COLLID LIKE CASE WHEN A.COLLID = '*' THEN c.col1 ELSE A.COLLID END
  and B.NAME   LIKE CASE WHEN A.NAME   = '*' THEN c.col1 ELSE A.NAME   END
   WITH UR;
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2430
Location: @my desk

PostPosted: Wed Jul 03, 2013 4:30 pm    Post subject:
Reply with quote

SYSPACKLIST should give you the list of collections under a particular plan and with that you can search in the SYSPACKAGE.
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Thu Jul 04, 2013 1:53 pm    Post subject:
Reply with quote

Did any one got a chance to review my post?
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10535
Location: italy

PostPosted: Thu Jul 04, 2013 2:38 pm    Post subject: Reply to: Query to list packages bound under a plan
Reply with quote

DO NOT SOLICIT FOR ANSWERS ...

people replying do it on their own time and free of charge
In Other Words when and if they feel like
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Jul 04, 2013 3:26 pm    Post subject:
Reply with quote

Gylbharat 183 views and going, meaning 183+ people have reviewed your post so far.

Check the below query
Code:
SELECT A.NAME, B.COLLID, C.NAME,C.VERSION                       
FROM SYSIBM.SYSPLAN A, SYSIBM.SYSPACKLIST B, SYSIBM.SYSPACKAGE C
WHERE A.NAME='GQIBAT'                                           
AND A.NAME = B.PLANNAME                                         
AND B.COLLID = C.COLLID                                         


Thanks,
Sushanth
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Thu Jul 04, 2013 5:58 pm    Post subject:
Reply with quote

Thanks Sushanth icon_smile.gif works very well...

I was trying the complicated way icon_sad.gif
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 Query on secondary index Suja.Sai IMS DB/DC 0 Wed Oct 31, 2018 9:47 pm
No new posts Silly question maybe - REPLACE member... Cloink TSO/ISPF 15 Thu Oct 25, 2018 6:38 pm
No new posts Log an Plan name/id or Job Id using D... SENTHIL MURUGAAN DB2 0 Mon Oct 22, 2018 4:17 pm
No new posts Query regarding STOP REGION XX ABDU... ashek15 IMS DB/DC 11 Fri Oct 19, 2018 10:13 am
No new posts Facing issue while executing multi ro... aagarwal88 DB2 6 Tue Oct 02, 2018 8:11 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us