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 

Get only duplicate Records in a file

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


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

PostPosted: Thu Nov 28, 2002 12:04 pm    Post subject: Get only duplicate Records in a file Reply with quote

The following DFSORT/ICETOOL JCl will give you the desired Results.Assuming that the duplicate key is of 10 bytes length and starts in position 1

Code:

//STEP0100 EXEC PGM=ICETOOL                   
//*                                           
//TOOLMSG   DD SYSOUT=*                       
//DFSMSG    DD SYSOUT=*                       
//IN        DD DSN=INPUT.FILE,               
//             DISP=SHR                       
//OUT      DD  DSN=OUPUT.DUPSKEYS,           
//             DISP=(,NEW,CATLG,DELETE),       
//             UNIT=SYSDA                     
//             SPACE=(CYL,(X,Y),RLSE)       
//TOOLIN    DD *                               
  SELECT FROM(IN) TO(OUT) ON(1,10,CH) ALLDUPS   
/*                                           


For more information on DFSORT's ICETOOL, see:

http://www.storage.ibm.com/software/sort/mvs/icetool/index.html
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Nabanita Das
Beginner


Joined: 09 Nov 2005
Posts: 33
Topics: 10

PostPosted: Wed Nov 23, 2005 5:25 am    Post subject: Reply with quote

What should we use in the toodd if we need all non duplicate data as well as all dups data in separate datasets?
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Wed Nov 23, 2005 5:36 am    Post subject: Reply with quote

Please refer to Kolusu's replies in the below links, It explains how to extract non duplicate data as well as all dups data in separate datasets.

http://www.mvsforums.com/helpboards/viewtopic.php?t=110&highlight=xsum

http://www.mvsforums.com/helpboards/viewtopic.php?t=431&highlight=xsum
Back to top
View user's profile Send private message Send e-mail
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Nov 23, 2005 11:29 am    Post subject: Reply with quote

If you want one record with each key in one data set, and any other records with duplicate keys in another data set, you can use the "Keep dropped duplicate records (XSUM)" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/

If you want something else, then you need to explain exactly what you want with an example of your input records and expected output records.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
davinski.bby
Beginner


Joined: 30 Jul 2007
Posts: 31
Topics: 10

PostPosted: Sat Aug 04, 2007 12:17 am    Post subject: Reply with quote

Thanks for the help...
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Sat Aug 04, 2007 2:22 am    Post subject: Reply with quote

This page should become a sticky.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
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