Flat File Header and Footer

Does flatfile contain header & footer?
How to remove Header & Footer from a flatfile before extracting the data?
What information header & footer contains?

Questions by greek143

Showing Answers 1 - 6 of 6 Answers

A Flat file can have header and trailor.
These will contain the information about the file. For example, header will have date for which the file is, and trailor will have records count. this count may include header and trailor count as well.
Hence if a file is having header as "H20100920" and trailor as "T00000123" then, header is having first character which will say that this is a header and it will have date after this and for trailor, it starts with "T" and will have count after this and this count will be of 8 length. To Summarize:
1. The file is of date "2010-09-20" (20th Sep 2010).
2. The file contains 123 records. Out of which 1 is header and 1 is trailor record. hence 121 records are data records.
These are very important to validate the file and to ensure that we are processing the correct file.

Hope this helps.

Regards
Brajesh.

  Was this answer useful?  Yes

Does flatfile contain header & footer?
=>Yes, it may or may not contain header or footer depending on the requirements.


How to remove Header & Footer from a flatfile before extracting the data?
=> In the sequential file stage, select the "filter" property and enter
following command :
sed '1d;$d'
1d means delete first line and $d means delete last line.


What information header & footer contains?
=>Generally, header contains the column names of the file records. Footer may
contain total number of records, any end of file mark etc..


  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