IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

eliminate duplicates using syncsort


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dkalyan_c

New User


Joined: 06 Apr 2006
Posts: 17

PostPosted: Wed Jan 19, 2011 8:18 pm
Reply with quote

HI,

I have a flat file in the below fashion.

USA 9999999999 7022611210 OPEN
USA 9999999999 7022611210 OPEN
USA 9999999999 7022611210 CLOSE

i want to eliminate duplicates from this file.
my expected output is:

USA 9999999999 7022611210 OPEN
USA 9999999999 7022611210 CLOSE

how do i do this with SYNCSORT ot can i do this with any other sort utility

i tried the below

SORT FIELDS=COPY
SUM FIELDS=NONE

and this wont work.

The question here is i just want to eliminate the duplicate records and retain the order of the rest as it is
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jan 19, 2011 10:28 pm
Reply with quote

In order for any program to eliminate duplicate records, those records must be presented in a sorted order. You MUST sort those records on the key (whatever it is). So you need to tweak your statements:

SORT FIELDS=(position,length,type,A)
SUM FIELDS=NONE
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts How to remove block of duplicates DFSORT/ICETOOL 8
This topic is locked: you cannot edit posts or make replies. Compare files with duplicates in one ... DFSORT/ICETOOL 11
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
No new posts DFSORT/SYNCSORT/ICETOOL JCL & VSAM 8
Search our Forums:

Back to Top