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

Relating the tables in 2 different region


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 11, 2008 12:25 pm
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts Open VSAM File in IMS DC Region - DFS... IMS DB/DC 0
No new posts Need to fetch data from so many DB2 t... DB2 9
No new posts CICS region is terminated abnormally ... CICS 2
No new posts How to: PK does not exist in several ... DB2 6
Search our Forums:

Back to Top