Reporting rejected records in 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
jcoley
Participant
Posts: 11
Joined: Wed May 14, 2003 3:03 am
Location: United Kingdom

Reporting rejected records in DB2

Post by jcoley »

When inserting into an ODBC stage I can write rejected records to an error file using a Reject link and a constraint that looks like link.REJECTEDCODE 0 -- this works fine.

When I try to do the same thing with a DSDB2 stage it doesn't work -- even though DB2 fails to insert some records, they are not written to the error file.

Is this a bug with the DSDB2 stage or is there some other constraint I can use to make it work?

I am using DSDB2 in preference to ODBC because I want to use the BeforeSQL and AfterSQL to do some pre- and post-processing -- this works well using DSDB2 and does not seem so straight-forward using ODBC.

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

Post by chulett »

Try checking the 'Reject Row' check-box *without* adding a contraint as well and see if it works that way.

-craig
jcoley
Participant
Posts: 11
Joined: Wed May 14, 2003 3:03 am
Location: United Kingdom

Post by jcoley »

Having a reject link with no constraint has the same effect - no records written to the error file.

I've tried various other combinations of constraints and get either no records or all records written to the error file.

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

Post by chulett »

Then, unless someone else chimes it, it sounds like a bug (the OCI stage had a similar issue once). I'd report it to Ascential support.

-craig
bigpoppa
Participant
Posts: 190
Joined: Fri Feb 28, 2003 11:39 am

Post by bigpoppa »

Hi. If you report the bug, could you keep us posted on the fix? We're trying to do the same thing here.. Thanks, BP
Post Reply