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

To execute query on a Table on a different server


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

New User


Joined: 20 Jun 2008
Posts: 30
Location: Hyderabad

PostPosted: Mon Jun 01, 2009 3:32 pm
Reply with quote

Hi,

I want to execute a query on a table which is located on a different subsystem. I have two TSO regions for example t1 and t2. Db2 subsystems db1 and db2. I want to execute a query which is on db2 fromn t1. Please guide me..

I tried to save the query as a proc in QMF and tried to run it from t1 but it is not succesful.. Please help me if there is any other procedure to do it..

Thanks,
Nagesh.
Back to top
View user's profile Send private message
nagesh54

New User


Joined: 20 Jun 2008
Posts: 30
Location: Hyderabad

PostPosted: Tue Jun 02, 2009 11:43 am
Reply with quote

Hi,

In the above question I want to execute the query as a batch job from t1 on the table which is on other host t2 and the db system is db2.

Thanks,
Nagesh.
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Tue Jun 02, 2009 3:03 pm
Reply with quote

Hi Nagesh,
Please find out if the DDF connections are setup between the two subsystems. If they are setup already, you can use Locationid.qualifier.tablename for getting data from the table of other system.
Back to top
View user's profile Send private message
nagesh54

New User


Joined: 20 Jun 2008
Posts: 30
Location: Hyderabad

PostPosted: Tue Jun 02, 2009 5:22 pm
Reply with quote

Hi,

Thanks alot for the help.. One more thing, if the DDF connections are available then do we need to give any connect statements while executing through a batch job? or directly can we use that db2 subsystem name.

Thanks,
Nagesh.
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Tue Jun 02, 2009 9:13 pm
Reply with quote

You don't need to use the other subsystem name also. You can simply use the proper qualified table name in your programs.
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 Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Pulling a fixed number of records fro... DB2 2
No new posts RC query -Time column CA Products 3
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top