Dear experts,
I'm reading a file from Al11 which contains the following structure:
header20150327
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
end
I need to check if the first line contains the word "header" and a date with YYYYMMAA format, if the last line contains the word "end" and if the number of lines is not higher than 500.
At the begining I thought to split the header with ";" but it is not possible because the file doesn't contain the value. Do you know how can I read the different parts of a file and check the first and the last line?
Thank you so much in advance.
Regards,
Rebeca