Author |
Message
|
Venkat10 |
Posted: Thu Nov 12, 2015 8:34 am Post subject: Dynamic Datasource in compute node for PASSTHRU |
|
|
Novice
Joined: 10 Mar 2014 Posts: 19
|
Hi,
Is there a way I can assign datasource dynamically in Compute node when executing PASSTHRU.
SET Datasource = InputRoot.XMLNSC.StatementExecute.DataSource;
SET Environment.CommandExecute.record[] = PASSTHRU( ExecStmt to Database.{Datasource})
Error :
Text:CHARACTER:[unixODBC][Driver Manager]Data source name not found, and no default driver specified
Thanks for your help in advance. |
|
Back to top |
|
 |
mgk |
Posted: Thu Nov 12, 2015 6:45 pm Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
So this syntax looks about right and is certainly supported and does work. Try making sure the input message really does contain a value or the "Datasource" would be NULL which would not work. Also make sure a datasource of the right name exists in the odbc.ini file... _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
maurito |
Posted: Fri Nov 13, 2015 4:22 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
mgk wrote: |
So this syntax looks about right and is certainly supported and does work. Try making sure the input message really does contain a value or the "Datasource" would be NULL which would not work. Also make sure a datasource of the right name exists in the odbc.ini file... |
yes, but the op will still need to specify a datasource in the compute node ( which I think he has not, and hence the error ), and one that is compatible with the one passed in the input message. |
|
Back to top |
|
 |
mgk |
Posted: Fri Nov 13, 2015 7:44 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Quote: |
yes, but the op will still need to specify a datasource in the compute node ( which I think he has not, and hence the error ), |
Good point, this is still necessary at present.
Quote: |
and one that is compatible with the one passed in the input message. |
This has changed in IIB v10 and is no longer a requirement - you can mix and match different DSN for different DBs in the same Compute node now. For example, SELECT from Oracle and INSERT into DB2 works fine. To use this, all secondary DSNs must be specified as dynamic DSNs in the Database.xxx clause on the database statement (SELECT, INSERT, PASSTHRU etc)...
Kind regards. _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
maurito |
Posted: Fri Nov 13, 2015 8:14 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
mgk wrote: |
Quote: |
yes, but the op will still need to specify a datasource in the compute node ( which I think he has not, and hence the error ), |
Good point, this is still necessary at present.
Quote: |
and one that is compatible with the one passed in the input message. |
This has changed in IIB v10 and is no longer a requirement - you can mix and match different DSN for different DBs in the same Compute node now. For example, SELECT from Oracle and INSERT into DB2 works fine. To use this, all secondary DSNs must be specified as dynamic DSNs in the Database.xxx clause on the database statement (SELECT, INSERT, PASSTHRU etc)...
Kind regards. |
yes, but you still owe me the ORDER BY !! |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Nov 13, 2015 8:31 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
maurito wrote: |
yes, but you still owe me the ORDER BY !! |
All the FAVS!
 _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Venkat10 |
Posted: Mon Nov 16, 2015 8:37 am Post subject: |
|
|
Novice
Joined: 10 Mar 2014 Posts: 19
|
It worked when I configured some meaningful Datasource in Compute Node.
Thanks everyone for your help. |
|
Back to top |
|
 |
|