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
 
eliminate duplicates using syncsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: eliminate duplicates using syncsort
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

Moderator Team Head


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

PostPosted: Wed Jan 19, 2011 10:28 pm    Post subject: Reply to: eliminate duplicates using syncsort
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    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 Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am

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