Problem loading data into DB2 database table

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
BradMiller
Premium Member
Premium Member
Posts: 87
Joined: Mon Feb 18, 2008 3:58 pm
Location: Sacramento, CA

Problem loading data into DB2 database table

Post 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.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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?
BradMiller
Premium Member
Premium Member
Posts: 87
Joined: Mon Feb 18, 2008 3:58 pm
Location: Sacramento, CA

Post 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.
Post Reply