Separate 1st row from binary 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
saxena_richa
Participant
Posts: 24
Joined: Mon Apr 24, 2006 3:34 am
Location: USA

Separate 1st row from binary file

Post by saxena_richa »

Hi,
My src file is a EBCDIC binary file.
I want to skip the first row from this src file and process the rest. Since it is a parallel job, I m not sure if putting constraint @INROWNUM<>1 will work..
I m not able to use UNIX- head command as when I do 'wc -l' for this file it gives count=0. (The file seems to be a continuos chunk of binary data)
Can anybody guide me hw to achieve this.
Thnks
Richa
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

How do you define the 1st line in your file? Is it terminated by EBCDIC <cr> or is it fixed length? Unless you know that information you won't be able to do anything with the file.
saxena_richa
Participant
Posts: 24
Joined: Mon Apr 24, 2006 3:34 am
Location: USA

Post by saxena_richa »

Hi,
The src binary file is a fixed length one. Both the header and detail types are of same length.
Basically I wnt to separate the header nd read the 'rec-count' field value & thereafter use this to re-concile the number of detail recs following it.

From unix side we tried to use 'dd' command bt it didnt convert properly either.
I m clueless hw to go about this...Any help wud be appreciated :?
Thnks
Richa
saxena_richa
Participant
Posts: 24
Joined: Mon Apr 24, 2006 3:34 am
Location: USA

Post by saxena_richa »

Hi,
The src binary file is a fixed length one. Both the header and detail types are of same length.
Basically I wnt to separate the header nd read the 'rec-count' field value & thereafter use this to re-concile the number of detail recs following it.

From unix side we tried to use 'dd' command bt it didnt convert properly either.
I m clueless hw to go about this...Any help wud be appreciated :?
Thnks
Richa
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

This is not a difficult exercise to do in DataStage. Declare the input sequential file stage, set the correct fixed length, declare "first line is column names" to true - this will skip your header, and finally declare the file as EBCDIC in the General -> character set tab.
Post Reply