IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Splitting Duplicate Records


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Anbutheone

New User


Joined: 08 Oct 2008
Posts: 15
Location: Bangalore

PostPosted: Mon Dec 13, 2010 11:05 am
Reply with quote

I have a file with duplicate records. My requirement is to have one file without any duplicates and another file with the remaining records.

Say input file is

AAA
AAA
BBB
BBB
BBB

Outfile1 should be

AAA
BBB

Outfile2 should be

AAA
BBB
BBB

Can we do this in ICETOOL or anyother SORT methods?
Back to top
View user's profile Send private message
ssmukul

New User


Joined: 22 Jan 2008
Posts: 19
Location: India

PostPosted: Mon Dec 13, 2010 11:13 am
Reply with quote

Hi,

Yes, we can do this in ICETOOL. Below job will do what you have asked for:

Code:
//STEP1    EXEC PGM=ICETOOL                                       
//TOOLMSG   DD SYSOUT=*                                           
//DFSMSG    DD SYSOUT=*                                           
//SYSOUT  DD SYSOUT=*                                             
//SORTIN  DD *                                                     
AAA                                                               
AAA                                                               
BBB                                                               
BBB                                                               
BBB                                                               
//SORTOUT DD SYSOUT=*                                             
//SORTXSUM DD SYSOUT=*                                             
//TOOLIN   DD *                                                   
 SELECT FROM(SORTIN) TO(SORTOUT) ON(1,3,CH) FIRST DISCARD(SORTXSUM)
/*



Thanks.
Back to top
View user's profile Send private message
Anbutheone

New User


Joined: 08 Oct 2008
Posts: 15
Location: Bangalore

PostPosted: Mon Dec 13, 2010 11:17 am
Reply with quote

Thanks ssmukul for the quick reply..

I ll try this..
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Dec 13, 2010 11:34 pm
Reply with quote

Anbutheone,

For more information, see the "Keep dropped duplicate records (XSUM)" Smart DFSORT Trick at:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000094
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Format data from multiple records usi... SYNCSORT 4
No new posts Sort SMF records? SYNCSORT 6
No new posts To Discard record with 0 entry if Dup... SYNCSORT 7
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts Identify and write records containing... SYNCSORT 11
Search our Forums:


Back to Top