dbTalk Databases Forums  

DB2 AIX: Stored Procedure Dependency Script

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss DB2 AIX: Stored Procedure Dependency Script in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ARK
 
Posts: n/a

Default DB2 AIX: Stored Procedure Dependency Script - 05-24-2006 , 09:57 AM






Some stored procedures call other stored procedures. When moving
stored procedures as part of a release this requires that you create
the children procedures before the calling procedures.

Is there a tool, script, or some other way to determine the dependency
list?


Reply With Quote
  #2  
Old   
ARK
 
Posts: n/a

Default Re: DB2 AIX: Stored Procedure Dependency Script - 05-24-2006 , 03:55 PM






I hate to answer my own question as I thought it was more difficult
than this:

select R.ROUTINESCHEMA, R.ROUTINENAME AS SPECIFICNAME, X.ROUTINENAME,
rtrim(
p.bschema) || '.' || P.bname as DEPON
from syscat.PACKAGEDEP P, syscat.ROUTINEDEP R, syscat.routines X
where P.bschema = 'yourschema'
and p.btype = 'F'
and P.PKGNAME = R.BNAME
and P.PKGSCHEMA = R.ROUTINESCHEMA
and R.BTYPE = 'K'
and R.ROUTINENAME = X.specificname
and R.ROUTINESCHEMA = X.ROUTINESCHEMA
and X.valid = 'Y'
and X.routinetype = 'P'
and p.bschema||P.bname in (
Select Z.ROUTINESCHEMA ||Z.specificname
from syscat.routines Z
where Z.routinetype = 'P'
group by Z.ROUTINESCHEMA, Z.specificname )
order by R.ROUTINESCHEMA, R.ROUTINENAME;


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.