MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Split Duplicates and Unique Records using ICETOOL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
sharma_deepu
Beginner


Joined: 07 Feb 2011
Posts: 5
Topics: 4
Location: hyd

PostPosted: Tue Feb 08, 2011 11:20 am    Post subject: Split Duplicates and Unique Records using ICETOOL Reply with quote

i have two input files
file 1 contains following records
Code:

111111A20101008
111111S20101008
222222S20101008
333333A20101010
333333U20101010
333333S20101010
444444A20101010
444444U20101010
555555U20101010
666666A20101012



file 2 contians following records
Code:

111111S20101008
222222S20101008
333333S20101010
444444U20101010
555555U20101010
666666A20101012


lrecl=80,recfm=fb, fields=(1,7,A)

i need three output files
1) only duplciates from both two files
2)only non duplciates from both two files
3)both duplicates and non-duplciates in another file (from both two files)
_________________
deepu
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Feb 08, 2011 11:37 am    Post subject: Re: soting question using icetool or dfsort Reply with quote

sharma_deepu wrote:

lrecl=80,recfm=fb, fields=(1,7,A)

i need three output files
1) only duplciates from both two files
2)only non duplciates from both two files
3)both duplicates and non-duplciates in another file (from both two files)


isn't 3 just a copy of both files into a single file? Here is a DFSORT JCL which will give you the desired results. The SELECT operator will give you the first 2 outputs and then second SORT operator will sort the records on the key field and give you output 3

Code:

//STEP0100 EXEC PGM=ICETOOL                                 
//TOOLMSG  DD SYSOUT=*                                     
//DFSMSG   DD SYSOUT=*                                     
//IN       DD *                                             
111111A20101008                                             
111111S20101008                                             
222222S20101008                                             
333333A20101010                                             
333333U20101010                                             
333333S20101010                                             
444444A20101010                                             
444444U20101010                                             
555555U20101010                                             
666666A20101012                                             
//         DD *                                             
111111S20101008                                             
222222S20101008                                             
333333S20101010                                             
444444U20101010                                             
555555U20101010                                             
666666A20101012                                             
//DUPS     DD SYSOUT=*                                     
//UNQ      DD SYSOUT=*                                     
//ALL      DD SYSOUT=*                                     
//TOOLIN   DD *                                             
  SELECT FROM(IN) TO(DUPS) ALLDUPS DISCARD(UNQ) ON(1,7,CH) 
  SORT FROM(IN) TO(ALL) USING(CTL1)                         
//CTL1CNTL DD *                                             
  SORT FIELDS=(1,7,CH,A),EQUALS                             
//*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sharma_deepu
Beginner


Joined: 07 Feb 2011
Posts: 5
Topics: 4
Location: hyd

PostPosted: Wed Feb 09, 2011 10:34 am    Post subject: Reply with quote

i am very happy to receive this feedback thanks very much
_________________
deepu
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group