I have a text file I receive from a client where they send us a single file with multiple record types. I am trying to split the file into 3 files.
The record type is in positions 1-2 of each file and unique identifier is in positions 3-13. I need the program to start in the first row. If record type is "02" it looks to position 253-254 if it equals "OH" all record types with matching data in positions 3-13 are copied as-is to ResultsOH.txt in order by record number in positions 1-2. If it is equal to "MI" all records with matching data in positions 3-13 are copied as-s to ResultsMI.txt in order by record number in positions 1-2. If there is any record type with a unique identifier that is not contained in a record "02", the line is copied as-is to ResultMisc.txt.SampleFile.txt