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 (January 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 7 Jan 2008 16:02:33 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: Data manipualation help
Comments: To: Suren <suren3781@yahoo.com>
In-Reply-To:  <200801071552.m07BldvO020780@mailgw.cc.uga.edu>
Content-Type: text/plain; charset="iso-8859-1"

Data Need ( Drop = Temp ) ; Set Have ; Retain Temp ;

If ( A> Temp ) Then Do ; Output ; Temp = B ; End ;

Run ;

Toby Dunn

"Don't bail. The best gold is at the bottom of barrels of crap." Randy Pausch

"Be prepared. Luck is where preparation meets opportunity." Randy Pausch

> Date: Mon, 7 Jan 2008 10:52:13 -0500 > From: suren3781@YAHOO.COM > Subject: Data manipualation help > To: SAS-L@LISTSERV.UGA.EDU > > Hello, > I have a problem on data manipulation. The data is arranged on following > way: > A B > 00 11 > 02 19 > 04 24 > 06 23 > 13 28 > 25 39 > 31 45 > 31 43 > 35 56 > 46 50 > I want to extract only those rows where the value in column A is greater > than the preceding values of column B that has been extracted. For example, > given that first row is selected, the other rows need to be selected only > when the value of column A is greater than the value of column B (i.e. 11) > of the preceding row that has been selected and so on. The output would > have to look something like this: > A B > 00 11 > 13 28 > 31 45 > 46 50 > I would very much appreciate any suggestions and help. > THANKS > SUREN

_________________________________________________________________ Share life as it happens with the new Windows Live. http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008


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