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 (May 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 6 May 2008 16:02:59 -0400
Reply-To:     Ya Huang <ya.huang@AMYLIN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ya Huang <ya.huang@AMYLIN.COM>
Subject:      Re: checking order of variable values
Comments: To: sanvi_shinde@YAHOO.COM

Not an elegant solution, but works:

proc sort data=have out=byvisit; by id visit; run;

proc sort data=have out=bydate; by id date; run;

proc compare data=byvisit compare=bydate; run;

On Tue, 6 May 2008 12:19:48 -0700, nia <sanvi_shinde@YAHOO.COM> wrote:

>Hi All, >I have a sas dataset having variable ID, VISIT and DATE(mmddyy). I >want to check weather the visit number and date are in chronological >order for each id. I would like to select/find the ids not having >visit number or date in ascending order. (e.g. id 103). can anybody >help me with this one? > >Thanks, >Nia > > ID VISIT DATE >100 2 01/10/04 >100 3 01/20/04 >100 4 02/10/04 >101 2 01/05/04 >101 3 01/15/04 >102 2 01/08/04 >102 3 01/18/04 >102 4 01/28/04 >102 5 02/01/04 >103 2 01/27/04 >103 3 01/07/04


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