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
 

 

Relating the tables in 2 different region

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

New User


Joined: 22 Apr 2006
Posts: 44

PostPosted: Tue Nov 11, 2008 12:03 am    Post subject: Relating the tables in 2 different region
Reply with quote

Is it possible shall i write the query against the tables present in 2 different region.


I have the first table ( TABLE1 ) in DB2S Region, same table (TABLE1) in DB2V Region.

How i will combine this 2 table ( TABLE1 DB2S region, TABLE1 DB2V region)
Back to top
View user's profile Send private message

Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Tue Nov 11, 2008 11:15 am    Post subject:
Reply with quote

Please specify your requirement clearly. It would be great if you can post sample output.[/code]
Back to top
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Tue Nov 11, 2008 11:51 am    Post subject:
Reply with quote

It can be done .. you can put in database.tablespace for select and you will get it..

Sample

Select * from Table1 in tablespace.databasename; will work try it.
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Tue Nov 11, 2008 12:06 pm    Post subject: Reply to: Relating the tables in 2 different region
Reply with quote

I Guess this cannot be done . suggestions are welcome

Quote:

I have the first table ( TABLE1 ) in DB2S Region, same table (TABLE1) in DB2V Region.


Whats the requirement for joining same table in different region.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Tue Nov 11, 2008 12:25 pm    Post subject: Reply to: Relating the tables in 2 different region
Reply with quote

it can be done,
but the DB2 systems must be properly setup,
the issue falls into the realm of DRDA ( distributed relational database access )
the fact that the two DB2 subsystem run in the same zOS is logically irrelevant

once things are properly setup the locations of the DRDA partners are irrelevant,
( that' s the smart part of the whole thing )

the db2 manuals explain very clearly what has to be done
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Tue Nov 11, 2008 12:32 pm    Post subject:
Reply with quote

Quote:

it can be done,
but the DB2 systems must be properly setup,
the issue falls into the realm of DRDA


Thanks enrico for this information . I guess there are some issues with our shop. when I tried joining tables in two different regions I was getting an error icon_redface.gif
Back to top
View user's profile Send private message
VVRAVINDRA

New User


Joined: 04 Aug 2008
Posts: 46
Location: Chennai

PostPosted: Tue Nov 11, 2008 12:47 pm    Post subject:
Reply with quote

Please excuse me if I'm wrong... since I could not dig much gold from the requirement that is provided, the long journey starts from extracting the data from table in region1 with the specified select criteria and then extracting the data from same table in region2 with the same select criteria and do a compare of data... It would be a much easier process if your shop provides the PST tools.

Thanks,
Ravi
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Tue Nov 11, 2008 12:52 pm    Post subject:
Reply with quote

Prasanthhere wrote:

when I tried joining tables in two different regions I was getting an error icon_redface.gif


Do you remember what kind of error were you getting? It may be useful for us in future. icon_wink.gif
Back to top
View user's profile Send private message
callkris_cit

New User


Joined: 22 Apr 2006
Posts: 44

PostPosted: Tue Nov 11, 2008 11:16 pm    Post subject: Relating the tables in 2 different region
Reply with quote

I have the first table ( TABLE1 ) in DB2S Region, same table (TABLE1) in DB2V Region.

How i will combine this 2 table ( TABLE1 DB2S region, TABLE1 DB2V region)

The reason for combining these table is,

TABLE1 ( DB2S region ), and the same TABLE1(DB2V Region),
( Consider ROLLNO, MARK are 2 fields in the TABLE1)


If ROLLNO ( TABLE 1 DB2S ) = ROLLNO ( TABLE1 DB2V) and MARK( TABLE1 DB2S) Not equal to MARK(TABLE1 DB2V)

Then select those ROLLNOs
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Wed Nov 12, 2008 9:14 am    Post subject:
Reply with quote

Join the tables in SPUFI/QMF. That should work. I did not exactly try your query but I joined same table in different regions and got the expected results.

Just curious to know what are you going to do with them?
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 SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts To know activities on db2 tables ashek15 DB2 4 Fri Mar 03, 2017 11:23 pm
No new posts Determine Region with max bandwidth f... seahawk789 COBOL Programming 3 Mon Feb 27, 2017 8:26 pm
No new posts ERM-Diagram of SysIBM-Catalog-Tables Auryn DB2 2 Fri Feb 17, 2017 6:22 pm


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