Datatype mismatch AS400

One Star

Datatype mismatch AS400

Hi
I have created a AS400 input component.
Among the fields I want there is one that is called invoice description. In our AS400 this is set to type NCHAR(24)
When I look at the schema design I see that it is set with type String and DB Type to varchar.
It failes at the very first line. The text it finds is "2412 FEILBET."
My error code:
connecting to socket on port 3671
connected
Exception in component tAS400Input_1
java.sql.SQLException: Data type mismatch. (For input string: "2412 FEILBET.")
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:528)
at com.ibm.as400.access.SQLChar.getFloat(SQLChar.java:464)
at com.ibm.as400.access.AS400JDBCResultSet.getFloat(AS400JDBCResultSet.java:2869)
at as400_mitmas.fapred_0_1.FAPRED.tAS400Input_1Process(FAPRED.java:700)
at as400_mitmas.fapred_0_1.FAPRED.runJobInTOS(FAPRED.java:1065)
at as400_mitmas.fapred_0_1.FAPRED.main(FAPRED.java:936)
I have tried to alter the line so it has "FEILBET". Still the same error.
Anyone got ideas on why this happends?
Dan
Community Manager

Re: Datatype mismatch AS400

Hi Dan
Can you please upload a screenshot of schema?
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Six Stars

Re: Datatype mismatch AS400

Are you sure that the problem is related to that field? in the stack trace I see something related to float / numeric fields columns....
show your data if you want help...
One Star

Re: Datatype mismatch AS400

Hi
Sorry for late reply. I have been on a short holiday. Smiley Happy
Please find below my attached printscreen of my model.
Is tis what you wanted?
I also tested to remove the field I thought was worng. Imported just fine without that one.
Sp at least I know what field it is. Smiley Happy
Dan
Six Stars

Re: Datatype mismatch AS400

The code is issuing a getFloat (...at com.ibm.as400.access.AS400JDBCResultSet.getFloat...).
Maybe somewhere you have on as400 character data mapped as float ( maybe automatically wrongly by Talend ).
Have you checked that.
Also you should compare the "dds" command on as400 to the schema you are fetching.
bye