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
 

 

Running queries through SPUFI in distributed db2 systems

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Eshwar CICS

New User


Joined: 18 May 2011
Posts: 47
Location: India

PostPosted: Wed May 18, 2011 3:28 pm    Post subject: Running queries through SPUFI in distributed db2 systems
Reply with quote

We run queries using SPUFI in distributed db2 systems in following manner:

SELECT * FROM db2system.schema.table-name

But would like to run the query like below and would like to supply db2system and schema name separately:

SELECT * FROM table-name

Was successful in supplying the schema name separately using "SET CURRENT SCHEMA" but attempts of supplying db2system names have failed.

Any advise on how to supply db2system name separately is appreciated.
Back to top
View user's profile Send private message

GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Wed May 18, 2011 3:46 pm    Post subject:
Reply with quote

Code:
Enter the input data set name: 
 1  DATA SET NAME ... ===>
 2  VOLUME SERIAL ... ===>     
 3  DATA SET PASSWORD ===>     
                               
Enter the output data set name:
 4  DATA SET NAME ... ===>
                               
Specify processing options:     
 5  CHANGE DEFAULTS   ===> YES 
 6  EDIT INPUT ...... ===> YES 
 7  EXECUTE ......... ===> YES 
 8  AUTOCOMMIT ...... ===> YES 
 9  BROWSE OUTPUT ... ===> YES 
                               
For remote SQL processing:     
10  CONNECT LOCATION  ===>           

maybe option 10 ?
Back to top
View user's profile Send private message
Eshwar CICS

New User


Joined: 18 May 2011
Posts: 47
Location: India

PostPosted: Wed May 18, 2011 3:51 pm    Post subject:
Reply with quote

Yes that works.SPUFI issues a type 2 CONNECT statement to that server. But requirement is to do that in my input dataset.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Wed May 18, 2011 5:25 pm    Post subject:
Reply with quote

I don't think you can;
I don't understand who and why states such a requirement.
Or is it "Spufi in Batch" ?
Back to top
View user's profile Send private message
Eshwar CICS

New User


Joined: 18 May 2011
Posts: 47
Location: India

PostPosted: Fri May 20, 2011 11:32 am    Post subject:
Reply with quote

Hi GuyC,
At this point of time:

1. I still believe this can be done.Because SPUFI connects to location mentioned in option 10 and provides with a SQLCODE.So there is a SQL running behind the scenes which supports my belief.

2.Have such requirement because we deal with multiple DB2 subsystems and each time i dont want to change the location on option 10 and change the schema.

3. It believe it can be done with BATCH SPUFi which i am not looking for.

Thanks for your analysis and reply.Appreciate it.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Fri May 20, 2011 12:22 pm    Post subject:
Reply with quote

if possible , not by using he connect statement.
Quote:
CONNECT
...
This statement can only be embedded within an application program. It is an executable statement that cannot be dynamically prepared. It must not be specified in Java
...
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 Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts Syntax for running batch history repo... polymathtarun CA Products 1 Tue Jun 21, 2016 1:51 pm
This topic is locked: you cannot edit posts or make replies. BAE Systems - Recruitment Open Days -... Express Mainframe Jobs 0 Fri Apr 22, 2016 8:19 pm
This topic is locked: you cannot edit posts or make replies. Job Offer: Information systems consu... Express Mainframe Jobs 0 Thu Mar 10, 2016 7:18 pm
No new posts Problems in File-Aid / DB2 Spufi whil... amitc23 CLIST & REXX 6 Fri Feb 12, 2016 1:59 pm


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