Brett Kaiser (x002548) Blog

Not Just a Number - Brett Kaiser

sp_depends for DB2

Well, there really isn't anything that I know of that is like sp_depends for DB2 z/OS Version 7.2.  Hopefully V8 will alot more features...but for Now you have to interogate the catalog.  So this is how you do it....

    SELECT DISTINCT NAME,DNAME,BNAME                
      FROM SYSIBM.SYSPACKDEP D                      
INNER JOIN SYSIBM.SYSPACKSTMT S                     
        ON D.DCOLLID = S.COLLID AND D.DNAME = S.NAME
       AND D.DCONTOKEN = S.CONTOKEN                 
     WHERE BQUALIFIER = 'AXHRSPDA'                  
       AND BNAME IN('POSITION_TREE')                
  ORDER BY NAME,DNAME,BNAME                         
;
                                                   

And this new editor for posting is pretty neat...lots of features...like background color...and for anyone not familiar with the mainframe...that's what I get to look at all day..until I get another SQL Server project