Looks to me like you just need to put your records together. Attached is a small transformation and data file that will do that. I'm sure there are other ways. After the rows are together you can do whatever you want with them. You will have to change the input step to reflect however you are getting your data ..Data Base...File....etc.
PS: sorry for the names,reminders I don't need them