Removing Header and Trailer record of a EBCDIC 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
abhilashnair
Participant
Posts: 284
Joined: Fri Oct 13, 2006 4:31 am

Removing Header and Trailer record of a EBCDIC file

Post by abhilashnair »

I have a EBCDIC file and I am reading it using a Sequential File Stage and Schema File with RCP turned on.

The multi layout file has a header record which is 21 bytes. The Detail records are 2427 bytes long and the trailer record is 9 bytes long.

I managed to remove the header by using tail +22c in the Filter Property of Sequential File Stage. But when tried to remove Header and Trailer I am getting error saying "badly formed number for head command in Filter "
I used command tail +22c |head -2427c

This command if executed in Unix is working fine.
Any Suggestions?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I can't check right now, but perhaps the pipe symbol needs to be escaped, e.g. "\|". If each of the two commands work when used alone, that might be the cause.
abhilashnair
Participant
Posts: 284
Joined: Fri Oct 13, 2006 4:31 am

Post by abhilashnair »

I tried with the escape character but getting the same error
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I just tried it with a sequential file using "tail +2c | head -4c" as the filter and it worked with no problems at all.

Does yours work if you remove the Schema file definition?
Post Reply