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

Compare Two or more tables


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

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Fri Oct 29, 2010 12:11 pm
Reply with quote

Hi!
Is there a way, I could compare two or more tables in terms of columns, length, partition, indexes an so on.

Say there are two tables T1, T2 and T3. I would like to check whether the definitions of T1, T2 and T3 are same or different.

Is there any tool or mechanism to achieve this purpose?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Oct 29, 2010 2:58 pm
Reply with quote

The fine manual will tell you all about the DB2 catalog tables, which contain all the information that you are asking for (and much more), and which can be queried via SQL.
Back to top
View user's profile Send private message
tomehta

New User


Joined: 18 Aug 2008
Posts: 98
Location: India

PostPosted: Fri Oct 29, 2010 3:24 pm
Reply with quote

Hameed,
one of the solution could be,
You can write a small rexx to get the info of the tables from DB2 catalogue, syscolumns, systableparts etc and then comapre them.
hope this helps..
Back to top
View user's profile Send private message
HameedAli

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Fri Oct 29, 2010 4:15 pm
Reply with quote

Akatsukami and tomehta, Thanks for the suggestions.
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 Compare 2 files(F1 & F2) and writ... JCL & VSAM 4
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Compare two files with a key and writ... SYNCSORT 3
No new posts Compare latest 2 rows of a table usin... DB2 1
No new posts How to compare two rows of same table DB2 11
Search our Forums:

Back to Top