View previous topic :: View next topic
|
Author |
Message |
Eshwar CICS
New User
Joined: 18 May 2011 Posts: 47 Location: India
|
|
|
|
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 |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
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 |
|
|
Eshwar CICS
New User
Joined: 18 May 2011 Posts: 47 Location: India
|
|
|
|
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 |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
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 |
|
|
Eshwar CICS
New User
Joined: 18 May 2011 Posts: 47 Location: India
|
|
|
|
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 |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
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 |
|
|
|