Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Remove the dups other than the lowest value

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

Active User


Joined: 23 Mar 2005
Posts: 156

PostPosted: Wed May 03, 2006 12:16 am    Post subject: Remove the dups other than the lowest value
Reply with quote

I have a file FB 2 Bytes.
Code:
A1
A2
A3
A0
B1
c1


I need to sort it in the 1st column and if there are any dups, retain only the row that has the least value in the 2nd column.
Code:
A0
B1
C1


Right now what I plan to do is Sort in ASC order column 1 and 2,
Code:
A0
A1
A2
A3
B1
C1


Then in the next Step Sort only the 1st column with SUM FIELDS=NONE,EQUALS option to get,
Code:
A0
B1
C1

Using SYNCSORT I want to know if there is a better method than this.
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Wed May 03, 2006 1:45 am    Post subject: Re: Remove the dups other than the lowest value
Reply with quote

I think you got it. icon_biggrin.gif

Dave
Back to top
View user's profile Send private message
jasorn

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Wed Jul 12, 2006 4:30 pm    Post subject: Re: Remove the dups other than the lowest value
Reply with quote

DavidatK wrote:
I think you got it. icon_biggrin.gif

Dave

That's the only way I know.
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 182
Location: hyderabad

PostPosted: Fri Jul 14, 2006 12:08 am    Post subject: Re: Remove the dups other than the lowest value
Reply with quote

Hi,
You can use the SELECT clause with FIRST option.This is the other way only.

Thank you
Krishy
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 Remove junk values in a file and rite... KP1125 DFSORT/ICETOOL 2 Wed Jan 25, 2017 9:58 pm
No new posts Sort Card to Remove Duplicate records... raj4neo SYNCSORT 2 Wed Jan 25, 2017 4:44 am
No new posts Remove Special Characters from Mainfr... Rodger Zhang All Other Mainframe Topics 6 Wed Jul 06, 2016 1:12 am
No new posts Remove header only knobi SYNCSORT 5 Mon Feb 15, 2016 10:42 pm
No new posts Append to file, but also remove old r... Garry Carroll JCL & VSAM 3 Mon Jan 25, 2016 8:05 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us