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
 

 

Query on system tables to retrieve views with table as input

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

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Wed Mar 28, 2012 8:40 pm    Post subject: Query on system tables to retrieve views with table as input
Reply with quote

I have table as input. I would like to have query on system tables which output list of views defined using the table passed as input. In the output, I would like to have the views in output which defined from view (which defined from table) too.

for example, Let say tables t1,t2,t3,t4

View v1 is defined as follows.
select * from t1,t2 where ...

View v2 is defined as follows
select * from v1,t3 where ...

View v3 is defined as follows
select * from v2,t4 where ...

Note: For all views v1,v2,v3 one of the underlying table is t1

Input:
T1

Output:
V1
V2
V3
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1534
Location: Andromeda Galaxy

PostPosted: Thu Mar 29, 2012 11:14 am    Post subject:
Reply with quote

I am not sure if you are going to use it within the program but if you have tools like IBM ADMIN TOOL,BMC or PLATINUM you can the views associated to a table
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1280
Location: Belgium

PostPosted: Thu Mar 29, 2012 1:02 pm    Post subject:
Reply with quote

Checkout table SYSIBM.SYSVIEWDEP
Back to top
View user's profile Send private message
shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Fri Mar 30, 2012 2:57 pm    Post subject: Reply to: Query on system tables to retrieve views with tabl
Reply with quote

Thank you GuyC. I would able to get the solution for my question using system table SYSIBM.SYSVIEWDEP.
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 JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts To know activities on db2 tables ashek15 DB2 4 Fri Mar 03, 2017 11:23 pm
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm


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