Date: Mon, 27 Oct 2008 14:16:38 -0500
Reply-To: "./ ADD NAME=Data _null_," <iebupdte@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "./ ADD NAME=Data _null_," <iebupdte@GMAIL.COM>
Subject: Re: Reshape Data
In-Reply-To: <200810271855.m9RGDApx015427@malibu.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1
You may find this example somwhat helpful as a alternative or check.
There is a restriction of 100 to maximum value for obs.
data have;
input
memberId :$1. IC:$3. charge;
cards;
1 301 5207
1 301 6082
1 . 6082
2 473 5207
2 473 5207
2 301 6082
3 325 6082
3 473 5207
4 473 94
4 352 94
;;;;
run;
proc sql;
create view obs
as select count(memberid) as obs
from have
group by memberid
;
select max(obs) into :obs from obs;
quit;
run;
proc summary nway data=have;
class memberID;
output
idgroup(out[&obs](ic charge)=);
run;
proc print;
run;
On 10/27/08, Kim Brown <kibrown@ladhs.org> wrote:
> I got my code to work.
>
|