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
 

 

Remove Duplicates

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

New User


Joined: 22 Feb 2010
Posts: 52
Location: Cochin

PostPosted: Wed May 11, 2011 12:39 pm    Post subject: Remove Duplicates
Reply with quote

I have a requirement

There are 2 files with same layout each having the following fields in it.
1) Member ID (1-8) and (1 is the start pos, 8 end pos)
2) Member name (10-20)

I want to remove the records from the 1st file if the member ID in the 1st file is present in the 2nd file? i.e I want to extract only those records from 1st file to output file if it is not present in 2nd file...

Is this possible to achieve this using dfsort? please help
Back to top
View user's profile Send private message

Dsingh29

Active User


Joined: 16 Dec 2008
Posts: 132
Location: IBM

PostPosted: Wed May 11, 2011 12:59 pm    Post subject: Reply to: Remove Duplicates
Reply with quote

Hi.

Look at the previous topic:

http://ibmmainframes.com/about28564.html
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed May 11, 2011 4:18 pm    Post subject: Re: Reply to: Remove Duplicates
Reply with quote

Dsingh29 wrote:
Hi.

Look at the previous topic:

http://ibmmainframes.com/about28564.html


Hi Dsingh... This is very old topic.. and solution based on DFSORT at that time..

Now it is much smarter than that time... icon_smile.gif

Code:
//STEP0100 EXEC PGM=SORT           
//SYSOUT   DD SYSOUT=*             
//FILE1    DD *                     
MEMID001  AAAAAAAAAAAAAA           
MEMID002  BBBBBBBBBBBBBB           
MEMID003  CCCCCCCCCCCCCC           
//FILE2    DD *                     
MEMID003  CCCCCCCCCCCCCC           
MEMID004  DDDDDDDDDDDDDD           
MEMID005  EEEEEEEEEEEEEE           
//SORTOUT  DD SYSOUT=*             
//SYSIN    DD *                     
  OPTION COPY                       
  JOINKEYS F1=FILE1,FIELDS=(1,8,A) 
  JOINKEYS F2=FILE2,FIELDS=(1,8,A) 
  JOIN UNPAIRED,F1,ONLY   


Output will be..
Code:

MEMID001  AAAAAAAAAAAAAA     
MEMID002  BBBBBBBBBBBBBB     


seahawk789Let us know if this satisfies your requirement...
Back to top
View user's profile Send private message
seahawk789

New User


Joined: 22 Feb 2010
Posts: 52
Location: Cochin

PostPosted: Wed May 11, 2011 4:41 pm    Post subject: Reply to: Remove Duplicates
Reply with quote

Thanks a lot guys..
Special thanks to 'Escapa' for a neat solution..
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 Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Remove junk values in a file and rite... KP1125 DFSORT/ICETOOL 2 Wed Jan 25, 2017 9:58 pm
No new posts Sort Card to Remove Duplicate records... raj4neo SYNCSORT 2 Wed Jan 25, 2017 4:44 am
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


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