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
 

 

Syncsort Merge and remove duplicates in one step!

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
shilpa.khaire

New User


Joined: 21 Jul 2006
Posts: 39
Location: US

PostPosted: Fri Nov 06, 2009 12:51 am    Post subject: Syncsort Merge and remove duplicates in one step!
Reply with quote

Hi all!

I want to merge two files on one field. And then I want to remove the duplicates from this merged file based on some other field.
e.g.

File A + File B = File C - Merge on field 1
File C - Remove duplicates based on field 2.

Is this possible in a single SORT step? Is there any other(other than 2 steps) efficient way of doing this?

Thanks!
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Fri Nov 06, 2009 12:53 am    Post subject:
Reply with quote

syncsort or dfsort?
Back to top
View user's profile Send private message
shilpa.khaire

New User


Joined: 21 Jul 2006
Posts: 39
Location: US

PostPosted: Fri Nov 06, 2009 1:14 am    Post subject:
Reply with quote

Syncsort, even Synctool can do.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Thu Nov 12, 2009 2:49 am    Post subject: Re: Syncsort Merge and remove duplicates in one step!
Reply with quote

shilpa.khaire wrote:
Hi all!

I want to merge two files on one field. And then I want to remove the duplicates from this merged file based on some other field.
e.g.

File A + File B = File C - Merge on field 1
File C - Remove duplicates based on field 2.

Is this possible in a single SORT step? Is there any other(other than 2 steps) efficient way of doing this?

Thanks!

Yes, this can be accomplished in a single SyncSort step. If you provide sample input records and your desired output (including the RECFM and LRECL of each file), we can better assist you with the control statements.
Back to top
View user's profile Send private message
shilpa.khaire

New User


Joined: 21 Jul 2006
Posts: 39
Location: US

PostPosted: Fri Nov 13, 2009 1:15 am    Post subject:
Reply with quote

First Merge is on and the LRECL is 1500.
SORT FIELDS=(463,10,CH,D)

This is the second step which takes the output of above as an input.
SORT FIELDS=(26,21,CH,A),EQUALS
SUM FIELDS=NONE,XSUM

Op RECFM is FB and LRECL = 1500, same as input

Thanks!
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Fri Nov 13, 2009 2:13 am    Post subject:
Reply with quote

I am not clear as to what your first step is doing. Are you trying to "merge" or "join" a record from File 1 with a record from File 2 to create a new record, or are you combining all records from File 1 and File 2 to create a master file?
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am


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