how to remove the header and trailer from a source 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
starsaran007
Participant
Posts: 8
Joined: Wed Sep 27, 2006 10:15 pm
Location: Theni

how to remove the header and trailer from a source file

Post by starsaran007 »

hi,

i m facing a problem with sequential file.

i have a source file with header,footer and detail records.header will be the first record and footer will be the last record ,in between records are detailed records.i dont have any indicator like thing saying that it is a header or footer or detailed record.my job is to route the first and the last records to one file and between records to another file.suppose if there are only two records both must go to one file assuming that one is a header and another is a footer.i need to do this with the help of datastage job but not with unix commands.

can anybody help me how to solve this problem? :roll:
K.SARAVANAN
venkatvelpula
Participant
Posts: 80
Joined: Sat Mar 18, 2006 10:27 pm

Re: how to remove the header and trailer from a source file

Post by venkatvelpula »

Hi, You can use head and tail stages to get the first and last records and combine both of them with funnel.

Thanks
Venkat



starsaran007 wrote:hi,

i m facing a problem with sequential file.

i have a source file with header,footer and detail records.header will be the first record and footer will be the last record ,in between records are detailed records.i dont have any indicator like thing saying that it is a header or footer or detailed record.my job is to route the first and the last records to one file and between records to another file.suppose if there are only two records both must go to one file assuming that one is a header and another is a footer.i need to do this with the help of datastage job but not with unix commands.

can anybody help me how to solve this problem? :roll:
Post Reply