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

Can Application prog use table data from diff DB2 region


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

Active User


Joined: 08 Feb 2009
Posts: 116
Location: CHENNAI/NEW JERSEY - INDIA/USA

PostPosted: Tue Jun 28, 2011 7:34 pm
Reply with quote

Hi,

In our shop we have two DB2 test region's
A and B.

Using SPUFI to access data in region A we use A.Tablename.
Similarly to access data in region B we use B.Tablename.

In the Cob-DB2 application program we refer the table as "Tablename" itself.
So for the application program to use data from region A we give the Plan name corresponding to region A, which happens to be A in the SYSTIN of IKJEFT01.

Similar is the case to access data from region B.

Please let me know if during a single Run, data can be accessed from tables present across the two regions, assuming the program has been bound to both the regions.

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

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Tue Jun 28, 2011 10:06 pm
Reply with quote

Try this topic.

It may just have what you are looking for:

ibmmainframes.com/viewtopic.php?t=45639&highlight=packageset


P.S. - I can not figure how to make this a link. Some please advise.

edited to add the http: stuff
a cut and paste of a link will be formatted as such
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Jun 28, 2011 10:23 pm
Reply with quote

the question was badly posed with the wrong terminology

my understanding is that the TS is asking how to access from the same program tables residing in different DB2 subsystems

please confirm my suspicions!

short answer...
yes it is possible with the proper setup
Back to top
View user's profile Send private message
Elixir

Active User


Joined: 08 Feb 2009
Posts: 116
Location: CHENNAI/NEW JERSEY - INDIA/USA

PostPosted: Wed Jun 29, 2011 3:20 pm
Reply with quote

well the link answered the question....yes it is possible to access table across different regions in the same application program...thanks daveporcelan

but please correct the wrong terminology used by me..
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Jun 29, 2011 3:34 pm
Reply with quote

the link posted describes how to access tables created under different owners OWNERA.<tablename> vs OWNERB.<tablename> in one/single DB2 subsystem

nothing more nothing less

Quote:
yes it is possible to access table across different regions in the same application program

Your understanding of thing is as bad/annoying as your terminology and as bad/annoying as Your signature icon_evil.gif

the plan choice comes up after the choice of the subsystem - region You want to talk to as per
DSN SYSTEM(DB2SUBSYSTEM)
RUN PROGRAM(PROGRAM) PLAN(PLAN)

if You want to access tables residing in different as You call them TEST regions You must ask Your support to implement DRDA
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


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

PostPosted: Wed Jun 29, 2011 7:08 pm
Reply with quote

Elixir wrote:
Hi,

In our shop we have two DB2 test region's
A and B.

Using SPUFI to access data in region A we use A.Tablename.
Similarly to access data in region B we use B.Tablename.

Wrong.
Quote:
Please let me know if during a single Run, data can be accessed from tables present across the two regions, assuming the program has been bound to both the regions.

Can't do that.

You could create dynamic SQL using triple-qualified table names to do that. How I leave as an exercise for the student.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Thu Jun 30, 2011 1:12 pm
Reply with quote

if you use A.tablename and B.tablename in spufi and refer to A and B as "regions",
you actuallly mean a different "OWNER" or "qualifier" or even "schema".
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 Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
Search our Forums:

Back to Top