Handle 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
xch2005
Participant
Posts: 85
Joined: Fri Apr 29, 2005 3:13 am
Location: India

Handle reject file

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Run all the reject links into a Funnel stage and its output to the Sequential File stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ack! Or that. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
xch2005
Participant
Posts: 85
Joined: Fri Apr 29, 2005 3:13 am
Location: India

Post by xch2005 »

Thanks Ray for the suggestion, it works fine.
Post Reply