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
 
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: 6970
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 6 Fri Sep 22, 2017 7:08 am
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm

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