Page 1 of 1

Foreign Key Problem

Posted: Thu Mar 29, 2007 1:08 am
by bikan
My DS job uses ODBC to connect to DB2. Some of my Jobs fails in between throwing the following error message

"INSERT OR UPDATE VALUE OF FOREIGN KEY TGT.ETW_RMS_REG_CUST_NOTES_DTL.ETWREG_ACC_NOTES_R INVALID"

In other jobs, the job runs successfully with the similar kind of warnings .

How am i to stop these jobs failing and capture these records as part of rejects.

Presently, I am using the following condition as rejects

<Outputlinkname>.RejectedCode

I Hope i am clear with the requirment.

Posted: Thu Mar 29, 2007 4:57 am
by ray.wurlod
Make sure that every row you send to DB2 does not violate the foreign key constraint mentioned in the error message (or any other constraint for that matter).

Posted: Thu Mar 29, 2007 8:01 am
by DSguru2B
In order to capture the rejects, specify the constraint of the reject link as

Code: Select all

DBLINK.REJECTED
where DBLINK is the name of the link going to your odbc stage. Also make sure your array size is set to 1.