1. In the input record, I changed all 'N's to '0's and all 'Y's to '1's using INREC.
2. Sort the record on the key field 1st four characters so that the records get grouped on the key field.
3. Sum on the numbers - Col 6 thru 8.
If there are multiple occurences of Y in any column for a given key, they would add up and result in a value of more than 1.
4. In outrec, I change all zeroes back to 'N' and any value other than zero to 'Y'.
Note:
This solution will not work if the number of 'Y's in a column for a given key exceeds 9 occurences.
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum