| Thank you everyone for the response. It is much appreciated. Yes ABC is not constant.
Let me clarify a little bit more:
ISA*00* *00* *33*Test *ZZ*1234567*SBR*P*18*ABC* 200739933 *DMG*D8*XXXXXXXX*M~
to
ISA*00* *00* *33*Test *ZZ*1234567*SBR*P*18*ABC* 200739933 *DMG*D8*XXXXXXXX*M~REF*23*ABC
This is just one of many lines in the text. I guess I would need a loop. For ever SBR that it finds, it copies ABC (which is not constant), it places it after "DMG*D8*XXXXXXXX*M~" (XXXXXXX is always changing)
After it does so, it creates a new file or replaces the file with the changes. I hope I'm clear on that. Once again, thank you very much for the help. |