Hi guys, I was wondering if someone can give me a hand in helping me append transaction header line in a file at the end of the transaction detail lines.
Basically, I have a file that looks like this:
FHEAD File1
THEAD TRANS1-blah
TDETL HI1
TDETL HI2
TDETL HI3
TTAIL TRANS1-blah
THEAD TRANS2-blah
TDETL HELLO1
TDETL HELLO2
TTAIL TRANS2-blah
FTAIL File1
And I'm looking to have something like this:
TDETL HI1, THEAD TRANS1-blah
TDETL HI2, THEAD TRANS1-blah
TDETL HI3, THEAD TRANS1-blah
TDETL HELLO1, THEAD TRANS2-blah
TDETL HELLO2, THEAD TRANS2-blah
Basically, I want to have the THEAD line of a transaction appended at the end of all of the same transaction's TDETL line. Any idea?