Can some one help me please?
I am using below JCL to get sum
//STEP EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD *
AAAAAAA 90
AAAAAAA 30
AAAAAAA 40
AAAAAAA 10
XXXXXXX 45
BBBBBBB 90
TTTTTTT 80
//SORTOUT DD SYSOUT=*
//SYSIN DD *
INCLUDE COND=(1,7,CH,EQ,C'AAAAAAA')
SORT FIELDS=(1,7,CH,A)
SUM FIELDS=(9,2,ZD)
/*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD *
AAAAAAA 90
AAAAAAA 30
AAAAAAA 40
AAAAAAA 10
XXXXXXX 45
BBBBBBB 90
TTTTTTT 80
//SORTOUT DD SYSOUT=*
//SYSIN DD *
INCLUDE COND=(1,7,CH,EQ,C'AAAAAAA')
SORT FIELDS=(1,7,CH,A)
SUM FIELDS=(9,2,ZD)
/*
Obtained output
----+----1----+----2----+----3----+----4
AAAAAAA 90
AAAAAAA 80
AAAAAAA 90
AAAAAAA 80
But My expected output has to be
----+----1----+----2----+----3----+----4
AAAAAAA 170
AAAAAAA 170