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
 

 

How to search for a colum name in DB2?

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

New User


Joined: 24 Aug 2005
Posts: 24
Location: Hyderabad

PostPosted: Thu Jul 12, 2007 2:44 pm    Post subject: How to search for a colum name in DB2?
Reply with quote

Suppose if i want to modify a column name and dont know how many tables have that column included. How can I search/find the column in all tables exist in DB2? using anything like SPUFI, SQL statements, etc...

Thanks in advance..
Back to top
View user's profile Send private message

Karthikshankar

New User


Joined: 29 Jun 2007
Posts: 2
Location: Pune

PostPosted: Thu Jul 12, 2007 3:43 pm    Post subject: Searching Column Names Of A DB2 Table
Reply with quote

The Dictionary tables can be queried to get information about any columns. There are lots of dictionary tables like, SYSIBM.SYSTABLES, SYSIBM.SYSVIEWS, SYSIBM.SYSOBJECTS, SYSIBM.SYSPLANS etc. The Dictionary table SYSIBM.SYSCOLUMNS would contain all the column information (column type, it's integrity constraints etc).

A simple select Statement in SPUFI or QMF would help in retrieving this information.

A Sample SQL:

SELECT <DD-COLUMN1>,<DD-COLUMN2> FROM
SYSIBM.SYSCOLUMNS WHERE NAME = <COLUMN-NAME>

Note: Issuing a 'SELECT * FROM SYSIBM.SYSCOLUMNS' would display
lot of rows through which one can first check no. of columns the data
dictionary table has and accordingly issue the desired query.
Back to top
View user's profile Send private message
Raphael Bacay

New User


Joined: 04 May 2007
Posts: 58
Location: Manila, Philippines

PostPosted: Fri Aug 03, 2007 9:40 am    Post subject:
Reply with quote

The suggestion above will work. I would also like to suggest
if your system use DCLGEN libraries you can use ISPF 3.14 to
search for the particular column name in the PDS containing
the DCLGEN libraries. If you don't maintain DCLGEN libraries
then you can try the approach above.


Regards.
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 Search a Load Module sreekanth1984 TSO/ISPF 8 Tue Jun 07, 2016 8:45 pm
No new posts Copy one PDS to another PDS based on ... alluri12 JCL & VSAM 10 Tue Sep 29, 2015 8:10 pm
No new posts Search and replace the key in the report V S Amarendra Reddy SYNCSORT 1 Thu Jul 09, 2015 7:41 pm
No new posts Search Member Name in Library (DSORG=... jackare JCL & VSAM 9 Thu Jun 25, 2015 8:15 pm
No new posts Suggestion on Search and Split using ... shiitiizz DFSORT/ICETOOL 14 Tue Jun 16, 2015 1:20 pm


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