Date: Thu, 15 May 2008 22:41:14 +0000
Reply-To: toby dunn <tobydunn@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: toby dunn <tobydunn@HOTMAIL.COM>
Subject: Re: Need to have % chars in a macro var--can I get rid of this
In-Reply-To: <941871A13165C2418EC144ACB212BDB04E15C1@dshsmxoly1504g.dshs.wa.lcl>
Content-Type: text/plain; charset="iso-8859-1"
Dan ,
proc sql noprint feedback ;
select CatS( "'" , result_code , "'" ) into :vdw_tests separated by " "
from result_codes
;
quit;
data test;
set result_codes;
if result_code in ( &VDW_TESTS ) then put "'%' ok";
run;
Toby Dunn
"Don't bail. The best gold is at the bottom of barrels of crap."
Randy Pausch
"Be prepared. Luck is where preparation meets opportunity."
Randy Pausch
> Date: Thu, 15 May 2008 14:44:31 -0700
> From: NordlDJ@DSHS.WA.GOV
> Subject: Re: Need to have % chars in a macro var--can I get rid of this
> To: SAS-L@LISTSERV.UGA.EDU
>
>> -----Original Message-----
>> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On
>> Behalf Of Yu Zhang
>> Sent: Thursday, May 15, 2008 2:21 PM
>> To: SAS-L@LISTSERV.UGA.EDU
>> Subject: Re: Need to have % chars in a macro var--can I get
>> rid of this
>>
>> it needs an "unquote" here,
>>
>> where result_code in ("%unquote(%superq(vdw_tests))");
>>
>> Yu
>> On Thu, May 15, 2008 at 3:42 PM, toby dunn
>> wrote:
>>
>>> where result_code in ("%SuperQ(vdw_tests)")
>>>
>>>
>>>
>>>
>>>
>>>
>>> Toby Dunn
>>>
>>> "Don't bail. The best gold is at the bottom of barrels of crap."
>>> Randy Pausch
>>>
>>> "Be prepared. Luck is where preparation meets opportunity."
>>> Randy Pausch
>>>
>
> I tried this:
>
> data result_codes ;
> input @1 result_code $char9. @12 vdw_name $char10. ;
> datalines ;
> PSA*H PSA
> %FPSA*H PFPSA
> QCPSA*H PSA
> ;
> run;
>
> proc sql noprint feedback ;
> select result_code into :vdw_tests separated by '", "'
> from result_codes
> ;
> quit;
> data test;
> set result_codes;
> if result_code in("%SuperQ(vdw_tests)") then put "'%' ok";
> run;
>
> From my try of the above, with %superq only, result_code is not found IN() the list and with %unquote added according to Yu Zhang's advice, the warning about an unresolved macro returns. Any other suggestions?
>
> Dan
>
> Daniel J. Nordlund
> Washington State Department of Social and Health Services
> Planning, Performance, and Accountability
> Research and Data Analysis Division
> Olympia, WA 98504-5204
_________________________________________________________________
Make Windows Vista more reliable and secure with Windows Vista Service Pack 1.
http://www.windowsvista.com/SP1?WT.mc_id=hotmailvistasp1banner
|