| Date: | Sun, 26 Jul 2009 14:25:44 -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: SYSFUNC (QSYSFUNC) and QUOTES |
|
| In-Reply-To: | <1486.71.164.101.245.1248635550.squirrel@webmail.albany.edu> |
| Content-Type: | text/plain; charset=ISO-8859-1 |
%let name = %sysfunc(catx(%str( ),BILL,CLINTON));
%put &name;
%sysfunc arguments don't take quotes, so you have to generate a space
without quotes - %str( ).
-Joe
On Sun, Jul 26, 2009 at 2:12 PM, Mike Zdeb <msz03@albany.edu> wrote:
> hi ... any takers ???
>
> in the following, the only %LET STNUM= version that works is the one
> in which no quotes are placed around the two-letter state abbreviation
>
> can some "macro guru" please tell me why
>
> * example 1 ... works;
> data _null_;
> call symputx('stnum',stfips('NC'));
> run;
> %put &stnum;
>
> * example 2 ... does not work;
> %let stnum=%sysfunc(stfips('NC'));
> %put &stnum;
>
> * example 3 ... does not work;
> %let stnum=%qsysfunc(stfips('NC'));
> %put &stnum;
>
> * example 4 ... works;
> %let stnum=%sysfunc(stfips(NC));
> %put &stnum;
>
> and, same issue ...
>
> * works;
> data _null_;
> call symputx('name',catx(' ','BILL','CLINTON'));
> run;
> %put &name;
>
> * how do you do the above with %sysfunc;
> %let name=%sysfunc(fill-in-the-blanks)
>
> thanks
>
> --
> Mike Zdeb
> U@Albany School of Public Health
> One University Place
> Rensselaer, New York 12144-3456
> P/518-402-6479 F/630-604-1475
>
|