I have an input file having the following records
H20120518PAYROLL GENERAL DEDUCTIONS INTERFACE (FOR FLEET)
DR 000D987654320120518AUTDED 7500
DR 0000004142820120518AUTDED 7500
DR 0000016455620120518AUTDED 7500
DR 0000028910520120518AUTDED 7500
DT 0000029233620120518AUTDED 0 2012
DT 0000029317420120518AUTDED 0 2012
DR 0000030188520120518AUTDED 7500
DR 0000033678920120518AUTDED 7500
DR 0000052472620120518AUTDED 7500
DR 0000054812820120518AUTDED 7500
DT 0000055116820120518AUTDED 0 2012
DT 0000057157320120518AUTDED 0 2012
DR 0000057167020120518AUTDED 7500
DR 0000471907920120518AUTDED 7500
DT 0000770401020120518AUTDED 0 2012
T GENL DEDUCT INTERFACE (*****)
DR 000D987654320120518AUTDED 7500
DR 0000004142820120518AUTDED 7500
DR 0000016455620120518AUTDED 7500
DR 0000028910520120518AUTDED 7500
DT 0000029233620120518AUTDED 0 2012
DT 0000029317420120518AUTDED 0 2012
DR 0000030188520120518AUTDED 7500
DR 0000033678920120518AUTDED 7500
DR 0000052472620120518AUTDED 7500
DR 0000054812820120518AUTDED 7500
DT 0000055116820120518AUTDED 0 2012
DT 0000057157320120518AUTDED 0 2012
DR 0000057167020120518AUTDED 7500
DR 0000471907920120518AUTDED 7500
DT 0000770401020120518AUTDED 0 2012
T GENL DEDUCT INTERFACE (*****)
I want the same output file same as input file but i want to have a sum General Deductions( values are 7500, 0 ) as shown above in place of (******)
NB : (*****) are not present in the input file, i had included here so as to show where i want my sum.
Also in the trailer record (to the right of sum we've obtained' we also want the total no of records.
eg :
T GENL DEDUCT INTERFACE (******) Count = 152
H: HEader Record
T: Trailer Record
Can i have a sort card to achieve the above functionality