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 find the base table of an ALIAS ?

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

New User


Joined: 19 Feb 2007
Posts: 9
Location: India

PostPosted: Wed Nov 28, 2007 1:17 pm    Post subject: how to find the base table of an ALIAS ?
Reply with quote

how to find the base table of an ALIAS ?
Back to top
View user's profile Send private message

Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Wed Nov 28, 2007 4:03 pm    Post subject:
Reply with quote

Please try this out
SELECT NAME,TBNAME FROM SYSIBM.SYSTABLES WHERE NAME='Alias name' AND TYPE=’A’;
Back to top
View user's profile Send private message
esrraju

New User


Joined: 19 Feb 2007
Posts: 9
Location: India

PostPosted: Wed Nov 28, 2007 4:35 pm    Post subject: Hi SriHari,
Reply with quote

Thanks for your response.

This query will give you the Alias name itself, but I want to know that base table on which this Alias is built.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Wed Nov 28, 2007 4:42 pm    Post subject:
Reply with quote

Try SYSCAT.TABLES.
Back to top
View user's profile Send private message
esrraju

New User


Joined: 19 Feb 2007
Posts: 9
Location: India

PostPosted: Wed Nov 28, 2007 5:04 pm    Post subject: Hi Murali
Reply with quote

When I try this query select * from SYSCAT.TABLES ..It says SYSCAT.TABLES could not be found. Please ADVISE.
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Wed Nov 28, 2007 5:05 pm    Post subject:
Reply with quote

Murali...I too read somewhere that we can use SYSCAT.TABLES for that. But I tried to do a select on this table and ended up with SQLCODE = -204, ERROR: SYSCAT.TABLES IS AN UNDEFINED NAME.

Raju, Generating the DDL for the alias, will give the Create statement of that alias from which we can check the base table name..I am just trying to check for such a JCL. Will let you know, in case I find it.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Wed Nov 28, 2007 5:32 pm    Post subject: Reply to: how to find the base table of an ALIAS ?
Reply with quote

what about looking at " SYSIBM.SYSALIASES"
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Wed Nov 28, 2007 6:00 pm    Post subject:
Reply with quote

there is no such table, I beleive. I tried it out only to get another -204.
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 Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am


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