My solution: define each type of report line as an unpack TEMPLATE.
(You could use my little piece of code to help you with this --
Fixed length file layout - cut2fmt 2).
Once you've got your templates, use regex's to identify the line type, then unpack to get the fields.