can you please help me to achieve below goal JCL sort ? I have input file with different set if records. I need to remove the duplicates only specific record type based on 10,04 position. There should not be any change in other types of records.
I need to remove duplicates oly for P4 on position 10,4.
iNPUT:
P1AAAAAAA0101xxxxxxx
P2AAAAAAA0101xxxxxxx
P4AAAAAAA0101xxxxxxx
P4AAAAAAA0101xxxxxxx
P4AAAAAAA0102xxxxxxx
P4AAAAAAA0103xxxxxxx
P4AAAAAAA0104xxxxxxx
P5AAAAAAA0101xxxxxxx
P7AAAAAAA0101xxxxxxx
P9AAAAAAA0101xxxxxxx
EXPECTED OUTPUT:
P1AAAAAAA0101xxxxxxx
P2AAAAAAA0101xxxxxxx
P4AAAAAAA0101xxxxxxx
P4AAAAAAA0102xxxxxxx
P4AAAAAAA0103xxxxxxx
P4AAAAAAA0104xxxxxxx
P5AAAAAAA0101xxxxxxx
P7AAAAAAA0101xxxxxxx
P9AAAAAAA0101xxxxxxx
I would like to present you a small solution, a Little complicated but it works, maybe someone will have another one, more compact than mine:
Regards, Andreas