Datatype mismatch AS400

One Star

Datatype mismatch AS400

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
Exception in component tAS400Input_1
java.sql.SQLException: Data type mismatch. (For input string: "2412 FEILBET.")
at as400_mitmas.fapred_0_1.FAPRED.tAS400Input_1Process(
at as400_mitmas.fapred_0_1.FAPRED.runJobInTOS(
at as400_mitmas.fapred_0_1.FAPRED.main(
I have tried to alter the line so it has "FEILBET". Still the same error.
Anyone got ideas on why this happends?
Community Manager

Re: Datatype mismatch AS400

Hi Dan
Can you please upload a screenshot of schema?
Best regards
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

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
Six Stars

Re: Datatype mismatch AS400

The code is issuing a 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.

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables


How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration



Introduction to Talend Open Studio for Data Integration.


Downloads and Trials

Test drive Talend's enterprise products.