what about a little searching of previous posts ???
( both in the dfsort forum and in the jcl forum)
... click on the search tag ( the third one from the left, with the light blue background )
...type "sort duplicate records" and You will get lots of matches
You will certainly find useful suggestions and samples
how to get the duplicate records using sort utility
This is a rather vague statement. It can mean lots of different things. You need to explain clearly what it is you want to do before anyone can give you a specific answer.
Please show an example of your input records (relevant fields only) and what you expect for the output record. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input file.