Hi Forum.
I have this challenging issue that I'm hoping someone can help me.
I have a file that contains 3 different types of segments (AM00, AM01, AM32) in a hierarchy structure and I want to be able to pass the column key from the parent record to the children records.
AM00 - parent key: suffix# (underlined last column)
AM01 - parent key: card# (underlined last column)
Input data:
AM00,1,12345
AM01,ab,677
AM32,10
AM01,cd,789
AM32,20
--
AM00,2,23456
AM01,ef,654
AM32,30
AM01,gh,765
AM32,40
Output data:
AM00,1,12345
AM01,ab,677,12345
AM32,10,12345,677
AM01,cd,789,12345
AM32,20,12345,789
--
AM00,2,23456
AM01,ef,654,23456
AM32,30,23456,654
AM01,gh,765,23456
AM32,40,23456,765
Thank you for all your help.