Accessing DB2 (iSeries) at AS400 from DataStage server 8.1

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
braj
Participant
Posts: 17
Joined: Mon Dec 08, 2008 2:12 am

Accessing DB2 (iSeries) at AS400 from DataStage server 8.1

Post by braj »

Hi

We have a requirement wherein we need to access iSeries (DB2) at As400 end from DataSatge. We have got iSeries Database catalogued on DataStage server.

DS can use DB2 API stage but we have to create this job as Generic job which will have RCP turned on.

We tried with DB2 Connector Stage but it failed with below error:
QLFetch reported: SQLSTATE = HY010: Native Error Code = -99,999: Msg = [IBM][CLI Driver] CLI0125E Function sequence error. SQLSTATE=HY010 (CC_DB2DBStatement::dbsFetch, file CC_DB2DBStatement.cpp, line 1,510)

I tried to search it but could not find the solution for this.

Any help would really be appreciated.

Thanks
Brajesh.
Braj
antonyraj.deva
Premium Member
Premium Member
Posts: 138
Joined: Wed Jul 16, 2008 9:51 pm
Location: Kolkata

Post by antonyraj.deva »

Check the code page setting of the DB2/400 with your DBA. Couldn't remember the exact code set to be used at the moment.

Also try using the ODBC enterprise stage for the extract. If that also fails then it is good to look into the .odbc.ini file once to see if it is properly configured.
TONY
ETL Manager
Infotrellis India

"Do what you can, with what you have, from where you are and to the best of your abilities."
ppgoml
Participant
Posts: 58
Joined: Mon Aug 20, 2007 11:00 pm

Post by ppgoml »

Hi Brajesh,

I now can confirm that AS400/DB2 is not support by db2 connector at the moment, so you should go with odbc or db2 api stage.
Jack Li
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Post by BI-RMA »

I tried to connect to the iSeries from a DB2 Connector Stage in Version 8.5. We catalogued the iSeries on db2inst1 and provided "db2inst1" for property instancename.

We had to provide a View SYSIBMADM.ENV_SYS_INFO on the iSeries, which simply provides the same values as the same view within XMETA.

Afterwards I received warnings concerning a problem to set the LOCK WAIT Mode:

"DB2_Connector_5: Unable to set Lock Wait mode."
There is another message:
"DB2_Connector_5: DB2 reported: SQLSTATE = 42601: Native Error Code = -104: Msg = [IBM][CLI Driver][AS] SQL0104N An unexpected token "LOCK" was found following "". Expected tokens may include: "DEGREE". SQLSTATE=42601", but this just informational.

Nonetheless, the actual data selected from the database looks fine.

I'll try to find out whether it is possible to stop DataStage from trying to set a specific LOCK WAIT Mode on the iSeries.
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

I've used an ODBC Connector Stage succesfully to connect to Db2/AS400 instances , and no warnings in job logs , no issues ,performance is pretty decent .. Try using that if DB2 connector doesnt work for you right now ..

HTH
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Post by BI-RMA »

That is a nice suggestion, but unfortunately the Connectormigrationtool provided with 8.5 will not give You the option to migrate a DB2_UDB_API_16-Stage to the ODBC-Connector Stage but opt for migration to the DB2-Connector-Stage automatically instead. That would mean we would have to change about 1000 jobs manually to do the migration. I do not think we want to do that.

There is probably going to be enough hassle with the fact, that the DB2-API-Stage identified column-names by position in SQL-statements and the connectors need explicit naming.
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

Connectormigrationtool provided with 8.5 will not give You the option to migrate a DB2_UDB_API_16-Stage to the ODBC-Connector Stage but opt for migration to the DB2-Connector-Stage automatically instead.
Duh.. Im confused , who is the original poster of this thread ? or are you the same individual with a different ID or just hijacked it ? nowhere in the problem statement was the requirement to automate migration stated , .. I do Hope you find a good way out of the situation or find a way to continue using DB2/API stage ..
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Post by BI-RMA »

OK. You've got a point there. My problem is currently being scrutinized by the official support provider.

I just mentioned our problems here because others may be facing the same situation. Using the ODBC-connector for new jobs is definitely an option.
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
Post Reply