1) The record having record length 500 and the key is 60-66 position of the record.
2) Take all the 60-66 position from the record, sort them
3) remove the duplicates(60-66).
4) write only 60-66 into the output file
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: