Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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

Senior Member


Joined: 08 May 2006
Posts: 1002
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 Formatting using DFsort Guru Nandu DFSORT/ICETOOL 5 Thu Nov 30, 2017 7:33 am
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us