IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to find a " view definition" from catalog tabl


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
surya.kalyan

New User


Joined: 09 Jan 2007
Posts: 20
Location: Mumbai

PostPosted: Mon Jun 25, 2007 6:02 pm
Reply with quote

Is it possible to view the definition of a view after it has been created from some catalog tables given its name??
I checked the sysibm.sysviews table and it seems that it stores the definition of the view but I was not able to get a meaningful definition.
Please give the query if possible.
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Mon Jun 25, 2007 10:59 pm
Reply with quote

There is no query you can run to get the DDL. The best way is to use some third party tool like BMC or CA or even IBM.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Jun 25, 2007 11:34 pm
Reply with quote

wanderer wrote:
There is no query you can run to get the DDL. The best way is to use some third party tool like BMC or CA or even IBM.


It is in sysibm.sysviews the field TEST. Select all the rows where NAME is equal to the view you are looking for and order by seqno.
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Tue Jun 26, 2007 12:35 am
Reply with quote

My mistake. Yes, that is correct. Thanks Craq!
Back to top
View user's profile Send private message
catchyblues

New User


Joined: 28 Dec 2005
Posts: 24

PostPosted: Tue Jun 26, 2007 4:54 am
Reply with quote

Select text from Sysibm.sysviews where name = 'table-name'
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts SET PATH in View DDL DB2 2
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts Find the size of a PS file before rea... COBOL Programming 13
Search our Forums:

Back to Top