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

Remove the dups other than the lowest value


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
Reply with quote

I think you got it. icon_biggrin.gif

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

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Wed Jul 12, 2006 4:30 pm
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: 183
Location: hyderabad

PostPosted: Fri Jul 14, 2006 12:08 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Remove leading zeroes SYNCSORT 4
No new posts How to remove block of duplicates DFSORT/ICETOOL 8
No new posts To Remove spaces (which is in hex for... JCL & VSAM 10
No new posts How to remove spaces in between. SYNCSORT 12
Search our Forums:

Back to Top