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
 

 

To execute query on a Table on a different server

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: To execute query on a Table on a different server
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    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 Liberty Angel Server using RACF Keyring martin9 CICS 0 Tue May 02, 2017 5:49 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 Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm


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