Reading a fixed width file without Header and Trailer record

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
dsscholar
Premium Member
Premium Member
Posts: 195
Joined: Thu Oct 19, 2006 2:45 pm

Reading a fixed width file without Header and Trailer record

Post by dsscholar »

Hi

I am reading a fixed width file by removing a Header and Trailer record by placing a filter condition as grep -v HDR| grep -v TRL in the Sequential file stage,so it will be removing the header and trailer and i can able to process the detail records successfully

But in the case of without detail records(example only Header and Trailer record) ,its aborting with error like
Filter status 256;
filter process failed: 1;
import error at record 0.

Can anyone give me the suggestions to overcome this issue
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Check that the file has more than two lines before even attempting to process it. Add a reject link to the Sequential File stage to handle attempt to read empty file (that does not match metadata).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply