Header and Footer...

Hi All,

I need to write a script that In my file I have to check header and footer records are available or not. If it is available I have to run the script, otherwise I should not. But current script it is checking only the data inside the script. It is avoiding to check Header and Footer records and I need to verify that data records should be equal to Footer records, if it is not equal stop the process.

Hope I have explained my problem .

Experts please help me to resolve this issue.

Please give examples of input you have and output you expect, this may help people to provide an accurate answer.