Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 684
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: 10327
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: 10327
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: 1777
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 DFHJSON-TRANSFRM container for WebSer... mbattu CICS 0 Fri Oct 20, 2017 2:18 pm
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us