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
 

 

Can Application prog use table data from diff DB2 region

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Can Application prog use table data from diff DB2 region
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: 662
Location: Pennsylvania

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

Try this topic.

It may just have what you are looking for:

http://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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Tue Jun 28, 2011 10:23 pm    Post subject: Reply to: Can Application prog use table data from diff DB2
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Jun 29, 2011 3:34 pm    Post subject: Reply to: Can Application prog use table data from diff DB2
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: 1754
Location: Bloomington, IL

PostPosted: Wed Jun 29, 2011 7:08 pm    Post subject: Re: Can Application prog use table data from diff DB2 region
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    Post subject:
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    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 Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Application not run by time HH:MM tri... jzhardy IBM Tools 1 Sun Apr 09, 2017 3:22 pm


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