Rejecting bad records from sequential file

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
udayanguha
Premium Member
Premium Member
Posts: 37
Joined: Wed Oct 29, 2014 10:48 pm
Location: Ohio

Rejecting bad records from sequential file

Post by udayanguha »

Hi,
I have a sequential file stage which reads data from a file and propagates it further to the next stage. The problem is that my job fails whenever there's a bad record in the file (like metadata mismatch, different record type in file from the metadata). Is there a way I can reject bad records and let the good records flow to the next stage. I don't want to handle these bad records in next transformer stage, just want to reject these records in the sequential file stage itself (while reading the records).
Thomas.B
Participant
Posts: 63
Joined: Thu Apr 09, 2015 6:40 am
Location: France - Nantes

Post by Thomas.B »

If your stage fails when a bad record is read by the sequential file stage, the option 'Reject mode' must be set on 'Fail'.
Just change it to 'Continue' or 'Output' if you want to redirect them to a reject link and your job will process only with the good records.
BI Consultant
DSXConsult
udayanguha
Premium Member
Premium Member
Posts: 37
Joined: Wed Oct 29, 2014 10:48 pm
Location: Ohio

Post by udayanguha »

Hi Thomas,
Thanks for the reply. I do not have access to DS right now so I can't check so just a small question. Can I use the reject property of sequential file stage even when I am using the stage as a source stage. I mean, can there be a reject link while reading from a file or a reject link works while the records are being written into a sequencial file.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, it can have a reject link as a source or a target.
-craig

"You can never have too many knives" -- Logan Nine Fingers
udayanguha
Premium Member
Premium Member
Posts: 37
Joined: Wed Oct 29, 2014 10:48 pm
Location: Ohio

Post by udayanguha »

Got my DS access today and the reject link works fine for me. Thanks all for the help.
Post Reply