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 All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Structured Data and Nested Loops via ... COBOL Programming 0
No new posts Rexx to read current Panvalet editor/... CLIST & REXX 0
No new posts keylist key definition longer than 40... TSO/ISPF 2
No new posts sort to find out the char which repea... Mainframe Interview Questions 10
No new posts Compare 2 alphabets in a REXX and fin... CLIST & REXX 2
Search our Forums:


Back to Top