Conditional job processing based on a reject 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
harshada
Premium Member
Premium Member
Posts: 92
Joined: Tue May 29, 2007 8:40 am

Conditional job processing based on a reject file

Post by harshada »

Hi ,
I have an input file, which is validated using a transformer. If any record is incorrect then it is rejected at the transformer and is captured in a reject file else it goes to a dataset.
My requirement is :- I need to capture all the reject records inthe reject file. If there are reject records then i need to call a set of jobs (say A) , If there are no reject records then i need to call a different job (say B).
I tried using the 'Abort after (rows)' in the transformer , but in this case the job aborts and i do not have a reject file for further processing.
How do i handle this requirement ?

Thanks in Advance
Harshada
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You need to do this from a Job Sequence, as you are making decisions about which jobs to call. You can make the condition simple in the Job Sequence (i.e. execute a wc -l on the reject file to get the number of lines)
Post Reply