You can use a simple SORT/SUM for this like the DFSORT job below. However, note that for your H2222 records, 777+789 will overflow 3 digits so both records will be kept. You need to indicate what you want to do about overflow.
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Thanks for the reply Frank
i had few more questions
1) can this be done using Sort Utility insted of ICEMAN
2) Will this create any problem if the fields to be summed off has a declaration of s9(5)v99, in this case in the sort card should the length be given as (starting position , 7)