It would have helped if you'd explained the "rules" for getting from input to to output instead of making us guess. But I'll give it a shot.
Assuming that the second output record should have -4420 (the correct total), not -4620 (the incorrect total), the following DFSORT job will give you the output you asked for. However, I'm not really sure what the rules are for the last field which seems to have an embedded minus sign in the middle of it. Anyway, hopefully this will give you the idea of how to do what you want to do.
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
1000000000023 T062 0001 00000-4500
1000000000023 T062 0002 0000000000
1000000000023 T062 0002 0000009000
1000000054012 T025 0003 00000-3500
1000000054012 T025 0002 0000000-20
1000000054012 T025 0001 000000-900
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
SECTIONS=(1,13,
TRAILER3=(1,19,
20:TOT=(20,4,ZD,TO=ZD,LENGTH=4),
24:24,6,
30:TOT=(30,6,SFF,EDIT=(STTTT),SIGNS=(0,-))))
/*
SORTOUT would have:
1000000000023 T062 0005 0000004500
1000000054012 T025 0006 00000-4420