View previous topic :: View next topic
|
Author |
Message |
Vidya Bhama
New User
Joined: 17 Sep 2008 Posts: 41 Location: Chennai
|
|
|
|
Hi,
Is it possible to check two fields in the same record and write to an output dataset if equal using SORT.
for example
ABCD111111ABCD....
XXXX222222FGHJI.....
If the filed from position 1-4 is same as 11-14 then the record should be written to output (In the above example the first rec must be written and second should be rejected).
Can anyone help on this |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OMIT COND=(1,4,CH,NE,11,4,CH)
|
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Or to avoid the double negative for better understandability (is that a word?):
Code: |
INCLUDE COND=(1,4,CH,EQ,11,4,CH)
|
|
|
Back to top |
|
|
Vidya Bhama
New User
Joined: 17 Sep 2008 Posts: 41 Location: Chennai
|
|
|
|
thanks this worked.
Sorry for a delayed reply. |
|
Back to top |
|
|
|