Use gawk, nawk or /usr/xpg4/bin/awk on Solaris.
awk -F\; 'END { for (_ in _0) {
l = split(_0[_], t); t[5] = _5[_]
for (i=1; i<=l; i++)
printf "%s", t (i == l ? RS : FS)
}
}
{ _5[$2,$3] += $5; _0[$2,$3] = $0 }
' infile
---------- Post updated at 01:03 PM ---------- Previous update was at 12:54 PM ----------
If the file is already ordered:
awk -F\; 'END { print r }
!_[$2,$3]++ && NR > 1 {
print r; x = 0
}
{ $5 = x += $5; r = $0 }
' OFS=\; infile