LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 23 Oct 2007 09:48:54 -0400
Reply-To:     "Sridhar, Nagakumar" <nagakumar.sridhar@SPCORP.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Sridhar, Nagakumar" <nagakumar.sridhar@SPCORP.COM>
Subject:      Re: Newbie ...heed help
Comments: To: toby dunn <tobydunn@HOTMAIL.COM>
In-Reply-To:  A<BAY123-W329E9E9A66CD60FFEDED18DE9B0@phx.gbl>
Content-Type: text/plain; charset="us-ascii"

Toby: I think it needs to be:

proc sort data=have; by seq date; run;

data have; set have; by seq date; if first.seq; run;

Without the date in the sort and set statements, you'd have:

1 0123 oct 1 abc 1234 abc123 2 0125 oct 15 abc 1124 abc123 3 0128 oct 1 abc 1234 abc13f 4 0426 oct 12 abc 4576 abc978

Which is NOT what he's looking for..

Maybe I'm wrong (I have been wrong before)

Kumar -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of toby dunn Sent: Tuesday, October 23, 2007 9:36 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Newbie ...heed help

I got a little happy hitting the send button made a correction below:

Proc Sort Data = Have ; By Seq Date ; Run ;

Data Need ; Set Have ; By Seq ;

If First.Seq Then Output ;

Run ;

Toby Dunn Compromise is like telling a lie, it gets easier and easier. Each compromise you make, that becomes your standard. Perfection doesnt exist, once you reach it, its not perfect anymore. It means something else.> Date: Tue, 23 Oct 2007 00:06:25 -0700> From: frytz.d@GMAIL.COM> Subject: Newbie ...heed help> To: SAS-L@LISTSERV.UGA.EDU> > I want to filter a dataset by removing entry with same sequence number> but older data.> > sample:> > seq# date data1 data2 data2> 0123 oct 1 abc 1234 abc123> 0426 oct 12 abc 4576 abc978> 0123 oct 18 jfk 1234 abde23> 0128 oct 1 abc 1234 abc13f> 0426 oct 21 klm 9923 99c12g> 0125 oct 15 abc 1124 abc123> 0128 Sep 15 abc 1234 abc123> > > output should be> > seq# date data1 data2 data2> 0123 oct 18 jfk 1234 abde23> 0128 oct 1 abc 1234 abc13f> 0426 oct 21 klm 9923 99c12g> 0125 oct 15 abc 1124 abc123> > > ...please advise ....> The simplier the better _________________________________________________________________ Peek-a-boo FREE Tricks & Treats for You! http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us ********************************************************************* This message and any attachments are solely for the intended recipient. If you are not the intended recipient, disclosure, copying, use or distribution of the information included in this message is prohibited -- Please immediately and permanently delete.


Back to: Top of message | Previous page | Main SAS-L page