I have a file that has mulitple header records and their subsequent transaction records.
I am trying to copy the file, but only sum the count in the headers and create only 1 Header record.
<key> <date><time> <count>
file looks like
HeaderHome 04272009113000 0000002
Record1
Record2
HeaderHome 04272009113200 0000001
Record1
HeaderHome 04272009113500 0000003
Record1
Record2
Record3
Result should be
HeaderHome 04272009113000 0000006
Record1
Record2
Record1
Record1
Record2
Record3
I was able to addup the counts, but could not get the trans records copied using SYNCSORT.
I am trying to use the the IFTHEN to apply the merge or the sum only on the key (HeaderHome) but no breakthru.
Any suggestions?
Thanks in advance.