Reject Handling

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Reject Handling

Post by synsog »

Hi All,

I have a requirement to reject entire file even if a single row is not matching the defined business condition.Also, Job should complete as successful without any failure.

Please let me know if it is practically feasible.

Thanks,
synsog.
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Post by Nagaraj »

Use a Transformer to split the valid and invalid outputs to two seperate files. or one to a seperate reject file and the other to a target db or whatever target you have.

PS: Should use the business condition at your discretion.
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Post by synsog »

No - Actually, My requirement is not to process any records even if "a recored" is rejected on some conditions.
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Post by Nagaraj »

Okay, Add a column X using column generator(with Y value) and append it to the stream and add a TFm to split into two links one which says if the condition is not met and the other one just through put and do the fork join between them to see if there is any row coming from the reject link and try to add a condition =
the logic shd be if X = X(Through put X) then send it to reject file, otherwise process the whole file.

Logic is if there are rejects coming thru then it will match with every row coming from throughput link and it will be sent to reject file and job finishes successfully. hope this clears
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Post by Nagaraj »

One more way to do is with two jobs and use it in Sequence jobs.

1. Process the file and write it to a reject file if there are any rejects.
2. Send to the concerned person thru command notification stage if there is even one reject.
3. Use command stage to check if the reject file is empty and process the source file fully.
Post Reply