If this relates to the same analysis requirement as you last post then opening the file as a database for the detail records will effectively require that the header and footer in fo is discarded.
Plan B would be to extract the header and footer in a separate process (or two) and save them as files. Then concatentate them again once the amended detail data has been created (Header FileDetail OutputFooter file)
Alternatively forget about the database route previously suggested, grab every line from the report as it is by painting a songle field on a single line for the entire width of the report and grabbing everything.
For those lines which have "|" characters, slice and dice all the datafields out of each line using the techniques previously suggested (may require a couple of additional functions there) and reformat the line pretty much as before. Do not reformat the header and footer lines (ie the header and footer fields.)
Export the revised report lines.
I'm starting to wonder where this report is to be sent when you have finished with it and what it will be used for. Presumably the answers to these questions are fundamental to the structure of the file you are being asked to produce.
I hope this makes sense.