| Date: | Mon, 24 Mar 2008 10:04:43 -0500 |
| Reply-To: | yingtao <yingtaoliu@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | yingtao <yingtaoliu@GMAIL.COM> |
| Subject: | Re: Transpose |
|
| In-Reply-To: | <2fc7f3340803211717j54583bcck9b5c37455f6784f3@mail.gmail.com> |
| Content-Type: | text/plain; charset=ISO-8859-1 |
* data* given;
input p patid date mmddyy10.;
format date date9.;
cards;
4234 11112 7/1/2000
4444 11112 7/1/2000
6666 11112 7/1/2000
1123 11112 8/2/2000
2222 11113 7/2/2000
;
* proc* *sort* data=given;by patid date;*run*;
*data* need;
array pv(*) p1-p3;
do i=*1* to *3* until(last.date);
set given;
by patid date;
pv(i)=p;
end;
drop i p;
*run*;
|