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 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 28 Oct 2008 03:07:21 -0700
Reply-To:     Patrick <patrick.matter@GMX.CH>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Patrick <patrick.matter@GMX.CH>
Organization: http://groups.google.com
Subject:      Re: Numbering missing visits
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

May be something like that?

data visit; input pt:$1 visdat:date. visitid :$1.; format visdat date.; cards; 1 12JAN2008 1 . 1 20JAN2008 2 . 1 03FEB2008 M 1 1 15FEB2008 M 2 2 03JAN2008 1 . 2 27JAN2008 M 1 2 12FEB2008 2 . 2 25FEB2008 3 . 2 12MAR2008 M 1 2 28MAR2008 M 2 2 19APR2008 M 3 ;;;; run; proc sort data=visit; by pt visdat; run; data visit; /* call missing(count); */ do until(last.visitID); set work.visit; by pt visitID notsorted; if visitID eq 'M' then count + 1; else count=.; output; end; run; proc print; run;


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