Error Reading from Db2 database using Db2 API stage.

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Inquisitive
Charter Member
Charter Member
Posts: 88
Joined: Tue Jan 13, 2004 3:07 pm

Error Reading from Db2 database using Db2 API stage.

Post 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
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

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

Post by I_Server_Whale »

Inquisitive wrote:'#DSCAPIOP__DB2DSN#'.
There are two underscores in the parameter name. Could that be the problem?
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post 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
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
Inquisitive
Charter Member
Charter Member
Posts: 88
Joined: Tue Jan 13, 2004 3:07 pm

Post 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
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Looks like this is an one of those unresolved issues :(
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

Check this POST.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

The OP seems to have resolved the issue in this POST.

HTH,
Whale.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
Inquisitive
Charter Member
Charter Member
Posts: 88
Joined: Tue Jan 13, 2004 3:07 pm

Post 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.
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post 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.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
Inquisitive
Charter Member
Charter Member
Posts: 88
Joined: Tue Jan 13, 2004 3:07 pm

Post 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?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Inquisitive
Charter Member
Charter Member
Posts: 88
Joined: Tue Jan 13, 2004 3:07 pm

Post 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,
Post Reply