Removing Header and Trailer Records

How to remove Header and Trailer records from a file using abinitio components?

Questions by chaitugeek   answers by chaitugeek

Showing Answers 1 - 10 of 10 Answers

sham2sushil

  • Oct 23rd, 2010
 

If there is no indicater for the Header and Trailer Records then You can use dedup sort component: In the select_expr use next_in_sequence() >1 : It will remove header record. Use the key as {} and keep last record. Then you can collect last record as tailer record for the out port and remaining record from the dup port.


--Shambhu

  Was this answer useful?  Yes

Do you know the concept of stripping header and trailers.
If the header is lying in the first colum then it can be removed by partition by expression componenet.
or
by using the reformat also we can bo by taking output indexes.

  Was this answer useful?  Yes

nagarjuna

  • Jul 21st, 2011
 

You cam redefine format, Filter by expression & Run program components.

  Was this answer useful?  Yes

arnab ghosh

  • Feb 22nd, 2012
 

Use Unix SED

#--------------------------------------------------------------#
# This line removes both the header and the trailer record
#--------------------------------------------------------------#
#sed 1d;$d $File1 > $File2

#--------------------------------------------------------------#
#--------------------------------------------------------------#
# This line removes the trailer record
#--------------------------------------------------------------#
sed $d $File1 > $File2

#--------------------------------------------------------------#

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions