We have a file that arrives daily and has a sequence number in the trailer like
9999 TR SAP _AP Distribution 0000000000000001
0000000000000001 is the sequence number and the file that comes the next day should have
0000000000000002 and so on. We need to Validate Sequence Number in input file, reject the file if Sequence Number is duplicate or not matching with expected sequence number. Need a script that does the validation.
The file name is like
EFEGECC_20150704.txt and so on. We have a file coming in everyday of the year.