View previous topic :: View next topic
|
Author |
Message |
Elixir
Active User
Joined: 08 Feb 2009 Posts: 116 Location: CHENNAI/NEW JERSEY - INDIA/USA
|
|
|
|
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 |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
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 |
|
|
Elixir
Active User
Joined: 08 Feb 2009 Posts: 116 Location: CHENNAI/NEW JERSEY - INDIA/USA
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
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
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
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 |
|
|
|