Rejects

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
Indrani
Participant
Posts: 46
Joined: Fri Jun 17, 2005 8:31 am

Rejects

Post by Indrani »

Hi,
Iam catching the Rejects from my output table using REJECTS code. And if my input is 10000 rows and Iam getting 25 rejects caught in a flat file. For the first run, it was good. If Iam running the same job with 10005 records. Iam catching the 10000 records as the rejects, b'cos i know that all those records all already there in the table with a key. I want only the 25 rejects in my flat file. Is there a way I can catch it?
RS
reddy
Premium Member
Premium Member
Posts: 168
Joined: Tue Dec 07, 2004 12:54 pm

Post by reddy »

Do it with Constarint on key filed like Not[isnull(keyfield)] so it can not capture existing ones.

Thanks
Reddy
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Why are the 10000 rejecting? Primary key violation with INSERT ONLY SQL? You already know the answer. Don't try to INSERT rows that are already there, or switch your SQL to INSERT or UPDATE and superfluously update them (potentially). Or, build a more intelligent job that references the target and uses the knowledge of finding the row or not when sending the row on for loading. Existing rows could go to a link that performs pure UPDATE SQL, while non-existent rows go to the INSERT ONLY link.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply