Can someone can suggest me how to achieve this using a single SORT card. I know we can achieve this using ICETOOL but I would prefer if we did it using just DFSORT.
Why? To make life difficult? Since you want to SUM on one field, but need to SORT on several fields, you can't do this
using a single SORT card.
You can do it using a single ICETOOL SELECT pass as follows:
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//OUT DD DSN=... output file
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(1,5,CH) FIRST USING(CTL1)
//CTL1CNTL DD *
Perhaps you weren't aware that ICETOOL's SELECT could do it in a single pass?
If you want to do this with DFSORT instead of DFSORT's ICETOOL for some reason, use two steps - first sort the records on the three fields to create a temp file, then SORT and SUM on the temp file. This will accomplish in two passes what you can do with ICETOOL in one pass. After all, why be efficient?