Capturing rejected rows while inserting DB2

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
major
Premium Member
Premium Member
Posts: 167
Joined: Mon Nov 26, 2007 12:21 am

Capturing rejected rows while inserting DB2

Post by major »

Dear all,

I have a job to insert the data into DB2 DB.
Problem is the rejection file is not capturing the rows which are failed to
insert in the DB even when LinkName.REJECTED is used.

The above procedure is working fine for Sybase db.

Could you please help me in this regard.

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I have zero DB2 experience but let me check a couple of things. What stage are you using? Does it work if your second link has no constraint but instead is simply marked as a 'Reject' link?
-craig

"You can never have too many knives" -- Logan Nine Fingers
major
Premium Member
Premium Member
Posts: 167
Joined: Mon Nov 26, 2007 12:21 am

Post by major »

Hi Chulet,

I am using a seq file --> tfm ---> db2 stage.
I am using a hashed file to capture the rejected records which were failed to insert into the db.

I tried with simple reject but of no use

Thanks,
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Where is this hashed file or any sort of reject link / mechanism in the diagram you posted? How exactly are you trying to do this?
-craig

"You can never have too many knives" -- Logan Nine Fingers
major
Premium Member
Premium Member
Posts: 167
Joined: Mon Nov 26, 2007 12:21 am

Post by major »

Sorry , I tried but couldn't able to draw the reject link

Another output link is drawn from the Tfm to a Hashed file(reject file)

A constraint is put for the Hashed file in Tfm like
LinName(of DB2).REJECTED

I even tried with simple REJECT , but of no use.

Please advice

Thanks,
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You need to go into the Transformer stage properties and mark the link as "Reject". It should have no constraint expression, just check the box.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply