View previous topic :: View next topic
|
Author |
Message |
Vasanthr
New User
Joined: 24 Jan 2011 Posts: 21 Location: India
|
|
|
|
Hi
I have a file with around 100 records .In some records first 10 characters and another 10 characters matches with each other . I want to remove the records if these match . Is there any sort jcl to remove these?
eg.SAmple scenario
Input file
ABCDEFG123456767ABCDEF12332434
HHHHHHH454GHJKL7HHHHHH2324345
JSDSDSD123232343ABDSDSK232344
Here in first 2 records the (1,6) characters match with characters in (16,6) . So these must be removed and only third record must be present in output.
Output file :
JSDSDSD123232343ABDSDSK232344 |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Code: |
SORT FIELDS=COPY
EXCLUDE COND=(pos,length,format,operator,pos,length,format) |
|
|
Back to top |
|
|
Vasanthr
New User
Joined: 24 Jan 2011 Posts: 21 Location: India
|
|
|
|
thanks got it |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
That would be OMIT, not EXCLUDE. The DFSORT control statements would be:
Code: |
SORT FIELDS=COPY
OMIT COND=(1,6,CH,EQ,16,6,CH)
|
|
|
Back to top |
|
|
|