Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
Author Message
die7nadal

Active User


Joined: 23 Mar 2005
Posts: 154

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
References
PostPosted: Wed May 03, 2006 12:16 am    Post subject: Re: Remove the dups other than the lowest value Reply with quote

DavidatK

Senior Member


Joined: 22 Nov 2005
Posts: 715
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: 109

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: 161
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1