Date: Mon, 2 Nov 2009 14:44:19 -0500
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: WHERE Statement - Variable
Content-Type: text/plain; charset=ISO-8859-1
Seems like PROC FREQ to me. Or PROC MEANS. Or PROC SQL with sql-code, if
that's what you're used to.
PROC PRINT does not 'calculate' things, it just prints them.
On Mon, Nov 2, 2009 at 2:26 PM, SAS Swamy <email@example.com> wrote:
> I understand about the WHERE statement.
> Can someone please help with the code , how to store the value to a
> variable based on a WHERE condition
> proc print data=TEST_DATA1;
> where vaccode = 'test';
> proc print data=TEST_DATA2;
> where ELIG_TYPE = 'P';
> I am able to get the results with the above condition , I need to store
> the value to a variable and calculate the percentage from the overall
> for e-g
> Total = 600 ( overall total )
> test = 22 ( only code = 'test' )
> percentage 3.66
> - swamy.