Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Extract duplicates using dfsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
srajanbose
Warnings : 1

New User


Joined: 11 Oct 2004
Posts: 69
Location: chennai

PostPosted: Fri Oct 31, 2008 3:44 pm    Post subject: Extract duplicates using dfsort
Reply with quote

Below is my input file
Code:
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  ZVMINI1   
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  ZZ       
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRUD;  ZZ       
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  ZZZ       
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRUD;  ZZZZ     
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRUD;  Z1       
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  Z1       
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLSEX0D;  Z1       
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  Z2       
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  Z3       
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  Z4       
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLSEX0D;  Z5       
I want my output file as
Code:
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  ZZ
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRUD;  ZZ
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRUD;  Z1
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  Z1
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLSEX0D;  Z1
How to acheive this using dfsort.
Back to top
View user's profile Send private message

Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 992
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri Oct 31, 2008 8:05 pm    Post subject:
Reply with quote

Assuming you are matching on bytes 54 for length of 8 in FB records, the following will do the trick

Code:
//TOOL EXEC PGM=ICETOOL                                             
//TOOLMSG DD SYSOUT=*                                               
//DFSMSG  DD SYSOUT=*                                               
//SRCE    DD *                                                     
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  ZVMINI1       
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  ZZ             
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRUD;  ZZ             
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  ZZZ           
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRUD;  ZZZZ           
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRUD;  Z1             
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  Z1             
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLSEX0D;  Z1             
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  Z2             
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  Z3             
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  Z4             
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLSEX0D;  Z5             
/*                                                                 
//TARG DD SYSOUT=*                                 
//TOOLIN  DD *                                     
 SELECT FROM(SRCE) TO(TARG) ON(54,8,CH) ALLDUPS   
/*                                                 


My TARG sysout shows


Code:
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  ZZ   
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRUD;  ZZ   
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRUD;  Z1   
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLDPRRD;  Z1   
APV;DPR;OR7SQE.PFI.L03.D250608.DPR.DPR.RPL.RLSEX0D;  Z1   


Garry.
Back to top
View user's profile Send private message
srajanbose
Warnings : 1

New User


Joined: 11 Oct 2004
Posts: 69
Location: chennai

PostPosted: Tue Nov 04, 2008 9:27 am    Post subject: Reply to: Extract duplicates using dfsort
Reply with quote

Thanks a lot Garry.It works fine.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Updating the counters after eliminati... PANDU1 DFSORT/ICETOOL 12 Mon Nov 21, 2016 9:47 am
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us