i have a input file contains 1000 record and near about 30 colums are in the file, i want to print only duplicates records in my JCL.
is it any way we can specified in sort field
we know for removing duplicates
we put sumfield= none
for reatining duplicates what we can do
How you would do this depends on what exactly you mean by "print only duplicate records".
If you want to keep the second and subsequent record with each duplicate value, you can use DFSORT/ICETOOL's SELECT with FIRST and DISCARD.
If you want to keep all records with duplicate values (no unique records), you can use DFSORT/ICETOOL's SELECT with ALLDUPS.
If you want to keep the first record of those with duplicate values, you can use DFSORT/ICETOOL's SELECT with FIRSTDUP.
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: