Page 1 of 1

Problem loading data into DB2 database table

Posted: Tue Apr 20, 2010 12:39 pm
by BradMiller
I have a job which reads data from Dataset and writes to a DB2 Mainframe database tanle using DB2 API stage.The job runs sucessfully but doesn't post a single record.It gives the following error message "DB_Load_MM_COLL,0: Warning: Material_Extract_MM_COLL_Stg_Load.DB_Load_MM_COLL: [IBM][CLI Driver] CLI0112E Error in assignment. SQLSTATE=22005".The source columns datatype is varchar whereas target db2 datatype is decimal of [5,4].Is this error causing due to the length being not sufficient at the target side.I am doing a string to decimal conversion before loading to target.

Posted: Wed Apr 21, 2010 3:40 am
by ArndW
The SQLSTATE=22005 means an error in assignment so your assumption that the conversion is causing the problem is probably correct.
What is your output datatype to DB2 in the stage and what does your conversion call look like?

Posted: Wed Apr 21, 2010 11:27 am
by BradMiller
Thanks for your response.The target field datatype is decimal with precision of 5 and scale of 4.The Source field is varchar with length of 20.The function being used in transformer is string to decimal type conversion function before loading into DB2 table.The DB2 database is a unicode database.So I think that precision and scale at the target is causing the problem as its short than expected.