| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| sharma_deepu Beginner
 
 
 Joined: 07 Feb 2011
 Posts: 5
 Topics: 4
 Location: hyd
 
 | 
			
				|  Posted: Tue Feb 08, 2011 11:20 am    Post subject: Split Duplicates and Unique Records using ICETOOL |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Tue Feb 08, 2011 11:37 am    Post subject: Re: soting question using icetool or dfsort |   |  
				| 
 |  
				|  	  | 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 |  | 
	
		|  | 
	
		| sharma_deepu Beginner
 
 
 Joined: 07 Feb 2011
 Posts: 5
 Topics: 4
 Location: hyd
 
 | 
			
				|  Posted: Wed Feb 09, 2011 10:34 am    Post subject: |   |  
				| 
 |  
				| i am very happy to receive this feedback thanks very much _________________
 deepu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  | 
	
		|  |