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
 
How to eliminate duplicates by retaining last record ?

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

New User


Joined: 04 Feb 2008
Posts: 65
Location: Hyd

PostPosted: Thu Aug 19, 2010 2:34 pm    Post subject: How to eliminate duplicates by retaining last record ?
Reply with quote

Hi All,

I have data like this:

100 ABC
100 CDE
100 FGH
200 KLM
200 NOP
300 XYZ


I eliminated duplicate records by using below sort card.

Code:


SORT FIELDS=(1,3,CH,A)
SUM FIELDS=NONE


I got output like this:

Output:
100 ABC
200 KLM
300 XYZ

I want output mentioned like below where last record of the key is retained and all other records are eliminated.


Expected Output:
100 FGH
200 NOP
300 XYZ

Can get this using syncsort?? If so, please let me know.

Thanks,
Kalyan V
Back to top
View user's profile Send private message

kalyan.v

New User


Joined: 04 Feb 2008
Posts: 65
Location: Hyd

PostPosted: Thu Aug 19, 2010 3:29 pm    Post subject:
Reply with quote

Hi All,

I got the solution for this. It is already discussed in the forum.

http://www.ibmmainframes.com/viewtopic.php?t=41708&highlight=
Thanks,
Kalyan V
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Aug 19, 2010 11:09 pm    Post subject:
Reply with quote

Anyhow, the link you posted doesn't branch to a valid link. However, appreciate your effort in searching the Forum.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Thu Aug 19, 2010 11:44 pm    Post subject: Reply to: How to eliminate duplicates by retaining last reco
Reply with quote

the link has been fixed!

these things happen because of the way the URL tag is managed

[ url= http : // your _ URL . com] [/url]

inside the square brackets of the starting tag the poster should put the URL,
outside the clear text and then the closing tag

and this is how the result would look

here is where I got the solution
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Aug 20, 2010 12:07 am    Post subject:
Reply with quote

Thanks Enrico.
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 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 Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm

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