need to remove header and trailer from 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
hargun
Participant
Posts: 188
Joined: Mon May 16, 2011 7:41 pm
Location: United States

need to remove header and trailer from file

Post by hargun »

hi,

i am reading comma separted sequential file layout as follows

Header ---20150606NameOfile
Columname-columnID

records

trailer


i need to remove header ,column names and trailer so that i will load the records into the table.

i tried with filer option command sed '1d;$d' which only stripping the header and trailer part not the column name part and due to which i am not able to read the file.can you please help me on this.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

This should happen automagically in PX if the stage only includes the actual metadata for the detail records. Then anything that doesn't match (i.e. everything else) should reject.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply