|Date: ||Tue, 4 Oct 2011 11:29:00 -0300|
|Reply-To: ||Adriano Rodrigues <adriano@GPP.COM.BR>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Adriano Rodrigues <adriano@GPP.COM.BR>|
|Subject: ||RES: %let ?|
|Content-Type: ||text/plain; charset="iso-8859-1"|
De: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] Em nome de Bian,
Enviada em: terça-feira, 4 de outubro de 2011 11:25
Assunto: Re: %let ?
There will be more than one approaches. Most two often used as following:
input p14 COUNT
if p14=1 then call symput ('c1',count);
if p14=2 then call symput ('c2',count);
select count into: c1 from have where p14=1 ;
select count into: c2 from have where p14=2 ;
%put &c1 &c2;
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Adriano
Sent: Tuesday, October 04, 2011 10:11 AM
Subject: %let ?
Obs p14 COUNT
1 1 42.55
2 2 57.45
Suppose I want use this values for another math's and for print some texts
"the percentage was 42.55"
"you have 57.45 to work"
Suppose I want use this for one multiplication in future also:
" 42.55 x 57.45 is your index number"
How I use the %let to get this values in variables?
I wanted something like this but it not works.:
if p14=1 then %let c1=count;
if p14=2 then %let c2=count;
and later I could use &c1 and &c2..
Can someone clarify this to me?
Ty in advance,
Email messages cannot be guaranteed to be secure or error-free as
transmitted information can be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The
Centers for Medicare & Medicaid Services therefore does not accept
liability for any error or omissions in the contents of this
message, which arise as a result of email transmission.
CONFIDENTIALITY NOTICE: This communication, including any
attachments, may contain confidential information and is intended
only for the individual or entity to which it is addressed. Any
review, dissemination, or copying of this communication by anyone
other than the intended recipient is strictly prohibited. If you
are not the intended recipient, please contact the sender by reply
email and delete and destroy all copies of the original message.