Page 1 of 1

Handle reject file

Posted: Thu Aug 15, 2013 9:01 am
by xch2005
Hi,

We have an issue in way we get the records in a output sequential file in parallel job and the design is straight forward.

We have a 3 step validation for input records (from sequential file), first step is to validate column A and if it fails the record goes on to a reject file and if it pass goes on to the next step. Here if column b validation fails if goes on to a reject file and lastly, third step validation fails then goes to reject file and all the records that passed the validation goes on to the target (table). The reject file layout is the same for all steps.

The reject file that is used for all the 3 validations is the same file (col_val_rej.txt), in step 1 we have (in reject file) as 'File Update Mode = Overwrite' and 'First Line is Column Names = True' and for the remaining 2 steps 'File Update Mode = Append' and 'First Line is Column Names = False'

What is expected is that the reject file would always have only 1 header and other ones are rejected rows but that does not happen always?

If the data fails only on step 2 or step 3 then I get only the rejected rows and not the header (ie. column names).

If 'First Line is Column Names = True' for all steps then I get multiple header rows in between rejected rows.

Is there a way we can have 1st row in the reject file as header and all other as rejected records?

Thanks in advance.

Thanks.

Posted: Thu Aug 15, 2013 9:36 am
by chulett
If all of these 'steps' are in a single job then that's your problem. Sequential files support multiple readers but only one writer at a time. The steps would have to be completely separate for your approach to work.

Posted: Thu Aug 15, 2013 4:28 pm
by ray.wurlod
Run all the reject links into a Funnel stage and its output to the Sequential File stage.

Posted: Thu Aug 15, 2013 4:44 pm
by chulett
Ack! Or that. :wink:

Posted: Mon Aug 19, 2013 1:54 pm
by xch2005
Thanks Ray for the suggestion, it works fine.