So fast forward a few years and format and number of files has changed. Instead of 4, there are now 16. But there has been a change in the format that may make the code simpler. Here's the new format of the files.
FILE TYPE 1
Code: Select all
Credit Batch 029 Summary
MISC
ADDR
Seq# Account Number Amount Status
- MORE MISC BELOW THIS LINE -
FILE TYPE 2
Code: Select all
Debit Batch 029 Summary
MISC
ADDR
Seq# Account Number Amount Status
- MORE MISC BELOW THIS LINE -
FILE TYPE 3
Code: Select all
EMS Batch 029 Summary
MISC
ADDR
No Data To Report
The first line on file type 3 essentially just changes for 14 of the 16 files. I've already adapted the code for the 'No Data To Report' vs the original 'NO INFORMATION TO REPORT', and that part seems to work.
For file types 1 and 2, Instead of the relevant information being on line 8, it is now on the first line, which should simplify some of the code as only the first line is needing to be read. But I haven't figured out how to modify the code for this. I think the following could replace the for loop that goes through the first 7 lines and the set command on the next line:
but I'm not sure because of the way the variable 'ln' is being used.
Any assistance appreciated. I think I'm close but just need a little help.
