Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Assuming your duplicates always occur together as shown in your example, you can use a DFSORT/ICETOOL job like the following to do what you asked for. I assumed your 'key' is in positions 1-6, but you can change the ON operand appropriately depending on your actual 'key' positions.
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
12345
12345
qwerty
23456
23456
asdfgh
56789
56789
qwdfgh
//OUT DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(1,6,CH) FIRST USING(CTL1)
//CTL1CNTL DD *
OPTION COPY
/*
|
If your input is actually more complicated than you've shown, you need to show all of the possible variations. |
|