Page 1 of 1

Removing Header and Trailer record of a EBCDIC file

Posted: Wed Jun 10, 2015 1:19 am
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?

Posted: Wed Jun 10, 2015 5:46 am
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.

Posted: Thu Jun 11, 2015 12:40 am
by abhilashnair
I tried with the escape character but getting the same error

Posted: Thu Jun 11, 2015 1:28 am
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?