lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
Hi,
I have a requirement to remove the duplicates from a given file
The length of records is 5
Code: |
11111
22222
11111
33333
11111 |
I am using SYNCSORT,
Code: |
//SYSIN DD *
SORT FIELDS=(1,5,CH,A) EQUALS
OUTREC IFTHEN=(WHEN=INIT,
BUILD=(1,5,6:SEQNUM,4,ZD,RESTART=(1,5)))
INCLUDE COND=(6,4,ZD,EQ,1)
/* |
Upto Build, it's working fine.. But include condition is not working
Output : If I remove the include condition, it's correctly coming as
Code: |
111110001
111110002
111110003
222220001
333330001 |
I need those records with seqnum 0001. But if I give the Include condition,
it results in no output. Can't I apply condition to out rec?
I got many other options to remove duplicates. But I want to know, what is the problem with this sort card |
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Quote: |
Upto Build, it's working fine.. But include condition is not working
|
Because it(COND) is precessed before your SORT FIELDS\OUTREC is applied...
Use OUTFIL INCLUDE=(6,4,ZD,EQ,1) instead |
|