|
I see no need for the macro variable...
25 Data _null_;
26 ave = 9.3;
27 sd = 1.3;
28 Result = CatX('b1'x,Put(Ave,4.1),Put(SD,4.1 ));
29 put _all_;
30 Run;
ave=9.3 sd=1.3 Result=9.3±1.3 _ERROR_=0 _N_=1
On 9/18/07, toby dunn <tobydunn@hotmail.com> wrote:
> Since your are using the Macro variable in a data step, make your life
> easier and drop the call symput, I dont know which version of SAS you have
> so I wrote my solution in Version 9 code the Cat family of functions makes
> your life easier.
>
> %Let X = '00B1'x ;
>
> Data X ;
> set Stat ;
>
> Result = CatS( Put( Ave , 4.1 ) , &x , Put( SD , 4.1 ) ) ;
>
> Run ;
>
>
>
>
> Toby Dunn
>
> Compromise is like telling a lie, it gets easier and easier. Each
> comprimise you make, that becomes your standard.
>
> Perfection doesnt exist, once you reach it, its not perfect anymore. It
> means something else.
>
>
>
>
>
> From: sassql@GMAIL.COM
> Reply-To: sassql@GMAIL.COM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: resolving macro variable problem
> Date: Tue, 18 Sep 2007 06:37:44 -0700
>
> Dear all,
>
> I have a demographic table where i want to display ave +/- sd for age
> variable. For displaying the +/- using a hexadecimal character i have
> used the following data _nuLL_.
>
> data _null_;
> call symput('x','00B1'x);
> run;
>
> %put &X;
>
> Now i have a data step where i am trying to resolve this macro
> variable and it is not getting resolved.
>
> data x;
> set stat;
> result = compress(left(trim(put(ave,4.1))))||&x||
> compress(left(trim(put(sd,4.1))));
> run;
>
> I would appreciate if someone can tell me how can i resolve this macro
> variable?
>
> Regards,
>
> _________________________________________________________________
> Gear up for Halo(r) 3 with free downloads and an exclusive offer.
> http://gethalo3gear.com?ocid=SeptemberWLHalo3_MSNHMTxt_1
>
|