Six Stars

mainframe db2

I need to create a connection to mainframe db2.
In the Metadata , I tried to create a db connection.
DB Type: IBM DB2 ZOS
I left blank in Schema filed. Then click check. I got connection successful.
But if I entered schema name, I got "Connection failure. You must change the Database Settings.
com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704, SQLERRMC: SYSIBM.SYSSCHEMATA"
So there is no table schema or view schema can be generated.
Do you have any idea on what is wrong ?
Thanks.
12 REPLIES
Moderator

Re: mainframe db2

Hi,
I left blank in Schema filed. Then click check. I got connection successful.
But if I entered schema name, I got "Connection failure. You must change the Database Settings.
com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704, SQLERRMC: SYSIBM.SYSSCHEMATA"
So there is no table schema or view schema can be generated.

Perhaps you input schema is invalid. You can get the table schema from the option "Retrieve schema"
Fro more details, please refer to the related reference Setting up a DB connection
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: mainframe db2

I would guess that it's a permission problem on the DB2 database.
Six Stars

Re: mainframe db2

I sent the error to my dba. I was told SYSIBM.SYSSCHEMATA is not in mainframe. It is in regular db2, not mainframe.
I think DB Type: IBM DB2 ZOS should point to mainframe. Is there a bug inside?
Is there a way to work around?
Six Stars

Re: mainframe db2

I did the above works in version 5.2.1.
Today i tried it a lower version, 4. 1. 2. I can create the db connection (db2 zos) and also create schemas in the metadata without any problem.
Then I tried to use tDB2Input component to get data. (I used Repository which I created in metadata.) I got error:
om.ibm.db2.jcc.a.SqlException: unsupported encoding Cp037 for result set column
at com.ibm.db2.jcc.a.j.a(j.java:429)
at com.ibm.db2.jcc.b.kc.a(kc.java:2366)
at com.ibm.db2.jcc.b.jb.a(jb.java:3167)
at com.ibm.db2.jcc.b.jb.a(jb.java:1720)
at com.ibm.db2.jcc.b.jb.a(jb.java:1647)
at com.ibm.db2.jcc.b.jb.n(jb.java:562)
at com.ibm.db2.jcc.b.jb.j(jb.java:247)
at com.ibm.db2.jcc.b.jb.c(jb.java:57)
at com.ibm.db2.jcc.b.w.c(w.java:42)
at com.ibm.db2.jcc.b.cc.h(cc.java:177)
at com.ibm.db2.jcc.a.rf.p(rf.java:1256)
at com.ibm.db2.jcc.a.rf.a(rf.java:1951)
at com.ibm.db2.jcc.a.rf.a(rf.java:523)
at com.ibm.db2.jcc.a.rf.executeQuery(rf.java:507)
at test.test_0_1.test.tDB2Input_1Process(test.java:245)
at test.test_0_1.test.runJobInTOS(test.java:471)
at test.test_0_1.test.main(test.java:342)
It seems it couldn't know the datatype is IBM db2 ZOS, it just think it is regular db2.
Am I use the right component? Please advice.
Thanks.
Moderator

Re: mainframe db2

Hi,
Usually, we use tDBxxx components to do such working case, so I think you get the right component. Unfortunately for your issue, I have never met before, no more any suggestion on it.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: mainframe db2

Not sure still want to suggesting based on the error you got for the "Cp037 " it is a Mainframe coding so you may try to use mainframe component instead DB2.
Six Stars

Re: mainframe db2

In talend, I think db2 component is used for mainframe.
I did a lot of research on "Cp037" problem. I found this was caused the JRE version. We have to use international version to support encoding Cp037. For the international version, there a jar called charsets.jar. After I put charsets.jar into \Java\jre6\lib. It works fine now.
But I think Talend must have a bug in new version 5.2.1, it cannot generate metadata for mainframe. But version 4.1.2 can.
Moderator

Re: mainframe db2

Hi jijli,
But I think Talend must have a bug in new version 5.2.1, it cannot generate metadata for mainframe. But version 4.1.2 can.

Would you mind reporting an issue on talend Bug tracker, and our colleagues will review it and give a response to you, thanks a lot.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: mainframe db2

I created a bug report. Hope it could be solved soon.
https://jira.talendforge.org/browse/IF-71
Moderator

Re: mainframe db2

Hi jijli,
Thanks for your feedback, what's more, talend open studio production of version 5.2.2 will be released in two days. Perhaps this issue has been fixed on the newest version. Let's wait for that.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: mainframe db2

Hi Sabrina,
Can we configure Datacom MF DB in Talend?if yes then how?
Moderator

Re: mainframe db2

Hi,
Please take a look at document about:TalendHelpCenterSmiley Frustratedupported systems databases and business applications by Talend components.
There is no a specific component for Datacom MF DB. 
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.