View previous topic :: View next topic
|
Author |
Message |
pshongal
New User
Joined: 14 Jun 2012 Posts: 96 Location: India
|
|
|
|
I have requirement to compare duplicate records (but not all) in the file and remove repeated record.
My Input is as below.
Code: |
1111AUREC-1
1111AYREC-2
2222ACREC-3
2222AWREC-4
|
Output:
Code: |
1111AUREC-1
2222ACREC-3
2222AWREC-4
|
I will have to consider only those duplicate records which has value 'U' and 'Y' in position 6. Key is first 4 bytes. If you see the input, 3rd and 4th records are repeated, but I have to write it as is since the value in position 6 is not U or Y.
Thanks/PS |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2010 Location: USA
|
|
|
|
Tried to understand your requirements. IMHO it has nothing to do with the given example of data, isn't it?
1) If you "have to consider only those duplicate records which has value 'U' and 'Y' in position 6" then why the records keyed '2222' with their values of 'C' and 'W' are included into your output?
2) What, and why, and how is "considered" in two records with key '1111' when producing a single output record?
3) … questions take more space than your data sample, and your description - altogether...
Please, clarify your requirements - for others to be able to understand them, too. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
Or just use for this type of input data.
Code: |
OMIT==(6,1,CH,NE,C’Y’) |
|
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
Use INCLUDE COND=... just a typo correction. |
|
Back to top |
|
|
|