HI,
Based on your description, it seems that the .DAT file is having the structure. It is difficult to tell without looking at a sample file, as to the reason why the csv file does not get generated correctly. However, I think I should be able to make a repeatable to VB script that should re-format and do the necessary comparison through Excel which can be generated into a report format.
I have extensive experience with both VBA (Excel Macros) and VB in general to address your issue.
looking forward to working with you.
kind regards,
Nadeeja