Date: Thu, 9 Dec 2004 07:29:09 -0800
Reply-To: jlgoldberg@BRICK.NET
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: jlgoldberg@BRICK.NET
Organization: http://groups.google.com
Subject: Re: Create decimals from macro variables
Content-Type: text/plain; charset="iso-8859-1"
PD:
The %eval function does integer arithmetic. To get decimal values use
the %sysevalf function.
Jonathan
PD wrote:
> I have a macro variable Z100 in a do loop like this
>
> %macro whatever;
>
> %do z100=1 %to 10;
>
> ....................
>
> %end;
>
> %mend whatever;
>
> I need to create a new macro variable
>
> Z=z100/100.
>
> I tried this
>
> %let z=%eval(z100)/100;
>
> It did not work. I don't have access to SAS now (otherwise I would
try and
> test to figure out), but should I try
>
> %let z=%eval(Z100/100);
>
> ?
>
> Thanks.
>
> PD
|