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

Running queries through SPUFI in distributed db2 systems


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 1281
Location: Belgium

PostPosted: Wed May 18, 2011 3:46 pm
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
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: 1281
Location: Belgium

PostPosted: Wed May 18, 2011 5:25 pm
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
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: 1281
Location: Belgium

PostPosted: Fri May 20, 2011 12:22 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts DELETE SPUFI DB2 1
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts How to go into a subprogram in IBM De... IBM Tools 5
No new posts Running a Job with the Default User ID JCL & VSAM 2
Search our Forums:

Back to Top