Here's a DFSORT/ICETOOL job that will do what you asked for:
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input data set
//OUT DD DSN=... first record with each key
//SORTXSUM DD DSN=... subsequent records with each key
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(1,10,CH) FIRST DISCARD(SORTXSUM)
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:
Joined: 22 Apr 2006 Posts: 6258 Location: Mumbai, India
THANK YOU VERY MUCH FRANK. IT HELPS TO HAVE A NICE AND KNOWLEDGABLE GUY LIKE YOU ON THE FORUM.
I think You were excited enough after getting the solution...so the post is in CAPS... . Usually CAPS text is percepted for shouting.
And Yes, Frank is the Kernal Writer of ICETOOL so He knows everything about it, many times I proudly say that I know Frank...Perhaps one day I would be able to associate with Him..& Skolusu (another Intelligence in DFSORT)