Hi
think so this would be useful to you... some time back i was too searching for the same solution..... I got that from another forum...This is using utility ICETOOL ...
//STEP1 EXEC PGM=ICETOOL,REGION=1024K
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=XXX.YYY.INPUT,DISP=SHR
//SORTXSUM DD DSN=XXX.YYY.DUP,DISP=SHR
//OUT DD DSN=XXX.YYY.OUTPUT,DISP=SHR
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(1,3,CH) FIRST DISCARD(SORTXSUM)
/*
Here i have mentioned it with use of 1 key.. if so if your file has more than 1 key...
use it like
ON(1,3,CH) ON(4,2,CH)...FIRST DISCARD(SORTXSUM)