Page 1 of 1

Error Reading from Db2 database using Db2 API stage.

Posted: Thu Jan 11, 2007 4:29 pm
by Inquisitive
Hi,

I am facing problem when I try to execute a job to read from db2 database using Db2 API stage. Connection to Db2 Database is fine we are able to perform view data.

We have problem when we tried to execute job with All the details in Db2 API stage passed as Environment variables.
When we mention all required options (server name, db name, user name,password) in Db2 API stage with Environment variables I am able to perform "view data" successfully but not able to execute the job successfully.
However if I hardocde the details in Db2 API stage job runs just fine.

This is the error I get in the log. (I checked the log to made sure correct Env parameter values are passed to the job. )

APT_CombinedOperatorController,0: Fatal Error: Fatal: [IBM][CLI Driver] CLI0124E Invalid argument value. SQLSTATE=HY009
Unable to connect to DB2 server '#DSCAPIOP__DB2DSN#'.


Also, all other stages including Db2 Enterprise stage (connecting to same databse) works fine with Environment variables.

Is that some setting we need to do from server side?


Thanks

Re: Error Reading from Db2 database using Db2 API stage.

Posted: Thu Jan 11, 2007 4:36 pm
by I_Server_Whale
Inquisitive wrote:'#DSCAPIOP__DB2DSN#'.
There are two underscores in the parameter name. Could that be the problem?

Posted: Thu Jan 11, 2007 4:57 pm
by narasimha
If you are using Environment Variables you should be passing the parameters like this #$DSCAPIOP__DB2DSN#
I am sure you would have already used this - default value as $PROJDEF in your job parameters

Posted: Thu Jan 11, 2007 5:01 pm
by Inquisitive
Well, I dont know Where exactly it is picking '#DSCAPIOP__DB2DSN#' from.

I am using Env variable $DB2DSN.

How can I correct this?

Thanks

Posted: Thu Jan 11, 2007 5:07 pm
by narasimha
Looks like this is an one of those unresolved issues :(

Posted: Thu Jan 11, 2007 5:24 pm
by I_Server_Whale
Check this POST.

Posted: Thu Jan 11, 2007 5:37 pm
by I_Server_Whale
The OP seems to have resolved the issue in this POST.

HTH,
Whale.

Posted: Thu Jan 11, 2007 6:16 pm
by Inquisitive
I saw all those different posts, it seems it is different scenario in each cases (but if you see closely it is related to API stage or Plug in stages).

In our case I found out this is related to version of client.
We have server 7.5.2 on Linux 3.0. I have client 7.5.2 on windows XP.
So in this client version seems to be having some problem with passing Env variables from plug-In stages.
I am able to run this job from client 7.5.1A.

So if I compile this job on 7.5.1A it works fine. if it is compiled on 7.5.2 it just does not work .

I am not sure if it makes real sense, but I see problem in plug-in stages with 7.5.2 client.

Posted: Thu Jan 11, 2007 6:22 pm
by I_Server_Whale
Inquisitive wrote:
We have server 7.5.2 on Linux 3.0. I have client 7.5.2 on windows XP.

I am not sure if it makes real sense, but I see problem in plug-in stages with 7.5.2 client.
I had similar problem with version 7.5x2. When you say your client is 7.5.2 on windows XP. Is it 7.5x2 client? If it is, then a non-compatible client version is your issue, I guess.

Posted: Thu Jan 11, 2007 6:26 pm
by Inquisitive
I have client Datastage Designer ver 7.5.2

Even Server is Datastage 7.5.2 on Linux.

I dont think there should be any client incompatibility. Even it is, why only for that API stage when passing Env variables?

Posted: Thu Jan 11, 2007 9:02 pm
by ray.wurlod
How - precisely - have you specified the reference to the job parameter in your DB2 API stage? Copy/paste the field value and post that.
Also post the exact name of the job parameter from the job parameters grid in job properties.

Usually when an error message contains parameter references that include "#" it means that the parameter reference does not exactly match the name used in the job parameters grid.

Posted: Thu Jan 11, 2007 11:23 pm
by Inquisitive
Hi Ray,

I will post the details tomorrow once I am in office.

But this was a known issue with client 7.5.2 and we got the patches from the support team.

Thanks,