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: 10396
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 How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 6 Tue Jan 16, 2018 10:49 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts Squeeze record left so that zeroes ar... Vignesh Sid SYNCSORT 5 Fri Nov 10, 2017 1:40 pm

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