View previous topic :: View next topic
|
Author |
Message |
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
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 |
|
|
xknight
Active User
Joined: 22 Jan 2008 Posts: 117 Location: Liberty city
|
|
|
|
Hello,
Have you tried this
Code: |
SELECT * FROM SYSIBM.SYSPACKAGE
WHERE NAME = 'PGMNAME' WITH UR;;;; |
|
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
SYSPACKLIST should give you the list of collections under a particular plan and with that you can search in the SYSPACKAGE. |
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
Did any one got a chance to review my post? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
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 |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
Thanks Sushanth works very well...
I was trying the complicated way |
|
Back to top |
|
|
|