Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

JCL & VSAM :: Limit duplicate records in the SORT

$
0
0
Author: pshongal
Subject: Limit duplicate records in the SORT
Posted: Mon Nov 21, 2016 12:54 pm (GMT 5.5)

Hi All,
I have a requirement to limit number of duplicate records in a file.

For e.g:
Below is the record pattern

Code:
AAA
AAA
BBB
BBB
BBB
BBB
CCC
CCC
CCC
DDD

Requirement is to have max 2 duplicate records. So my o/p should be

Code:
AAA
AAA
BBB
BBB
CCC
CCC
DDD

Thanks.
_________________
Thanks,
PS


Viewing all articles
Browse latest Browse all 8500

Trending Articles