View previous topic :: View next topic
|
Author |
Message |
Gautam512
Active User
Joined: 05 Oct 2005 Posts: 308 Location: Vizag / US
|
|
|
|
Hi all,
I have a query,
Using XSUM i'll remove the dplicate records, and the requirement is i need to delete the that particular record also for which duplicates are present.
Ex:
Input
------------
AAABBB
CCCDDD
ABCDEF
CCCDDD
AAABBB
EEEFFF
Output:
----------
ABCDEF
EEEFFF
Hope u understood, can this be done using SYNCSORT
or any other approach is also welcome, then i have check whether that particular utility is there in my shop or not.
Thanks in Advance, |
|
Back to top |
|
|
martijn
New User
Joined: 09 Mar 2006 Posts: 14 Location: The Netherlands
|
|
|
|
I don't know how to do this in one step, but, using DFSORT, i can do it in three:
step 1: add a '1' at the end of each record, so input looks like this:
AAABBB 1
CCCDDD 1
ABCDEF 1
CCCDDD 1
AAABBB 1
EEEFFF 1
Step 2: summarize on the added field, so the output looks like this:
AAABBB 2
CCCDDD 2
ABCDEF 1
EEEFFF 1
Step 3: now omit all records with a value greater the 1 on the last field, and using OUTREC, remove the last field:
ABCDEF
EEEFFF
I hope this helps. If you want, I can give you the sort-statements to do this with.
[/quote] |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I don't know how to do this in one step, but, using DFSORT, i can do it in three: |
You don't need three passes to do it with DFSORT - you can do it in one pass with DFSORT's ICETOOL like this:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//OUT DD DSN=... output file
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(1,3,CH) NODUPS
/*
|
|
|
Back to top |
|
|
Gautam512
Active User
Joined: 05 Oct 2005 Posts: 308 Location: Vizag / US
|
|
|
|
Thanks a lot Frank Yaeger,
i'll try if ICETOOl is there in our shop.
Can u we do the same thing in SYNCSORT or DFSORT.
Thanks in advance... |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Gau,
I understand that you have Syncsort, not DFSORT, since you said that in your first post. I only posted the one-pass DFSORT solution to set the record straight because martijn indicated it would take three passes with DFSORT. |
|
Back to top |
|
|
Gautam512
Active User
Joined: 05 Oct 2005 Posts: 308 Location: Vizag / US
|
|
|
|
Thanks to both of u( Frank & martijn) for ur quick replies.... |
|
Back to top |
|
|
Rameshs
New User
Joined: 15 Jun 2005 Posts: 53 Location: India, Chennai
|
|
|
|
Is there any other method to remove duplicate records without using SORT Utilities (DFSORT/SYNCSORT) ? |
|
Back to top |
|
|
|