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

Active Member


Joined: 08 May 2006
Posts: 995
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
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Extract Data till prev hour balaji81_k DB2 16 Fri Aug 25, 2017 9:25 pm
No new posts What is the Extract Function in JCL dharmaraok JCL & VSAM 3 Wed Jun 14, 2017 9:12 am
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm

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