From your sample data I would create two new templates. The first one would be a footer template (since it occurs after your detail line) that starts to trap on the line beginning with Serial#. I would use a blank followed by a non-blank trap to capture the space before the "S" in serial # and the letter "S". You would then create a field that captures the whole line. Once you define the field, in template editor, edit the new field and select the advanced properties, and then end field on a blank field value of 1. This will capture the lines you don't want at first. You then create a new exclusion template that is 3 three lines long that starts on the beginning of the line with ">>>>". This is assuming that everytime you see ">>>>" you want to exclude three lines. If you can share the file, I can help with some more thoughts, but I hope this points you in the right direction.