Foreign Key Problem

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
bikan
Premium Member
Premium Member
Posts: 128
Joined: Thu Jun 08, 2006 5:27 am

Foreign Key Problem

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply