Date: Thu, 15 May 2008 16:20:57 -0500
Reply-To: Yu Zhang <zhangyu05@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Yu Zhang <zhangyu05@GMAIL.COM>
Subject: Re: Need to have % chars in a macro var--can I get rid of this
In-Reply-To: <BAY123-W286855090CB495717D0A46DEC90@phx.gbl>
Content-Type: text/plain; charset=ISO-8859-1
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 <tobydunn@hotmail.com> 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
>
>
> > Date: Thu, 15 May 2008 13:12:52 -0700
> > From: pardee.r@GHC.ORG
> > Subject: Re: Need to have % chars in a macro var--can I get rid of this
> > To: SAS-L@LISTSERV.UGA.EDU
> >
> > That hasn't worked in the places I've tried it. What do you have in
> > mind?
> >
> > Thanks!
> >
> > -----Original Message-----
> > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
> > karma
> > Sent: Thursday, May 15, 2008 12:14 PM
> > To: SAS-L@LISTSERV.UGA.EDU
> > Subject: Re: Need to have % chars in a macro var--can I get rid of this
> >
> > On May 15, 7:34 pm, parde...@GHC.ORG ("Pardee, Roy") wrote:
> >> Hey All,
> >>
> >> The code below gives the harmless WARNING "Apparent invocation of
> >> macro <> not resolved.". I think I'm resolved to ignore it,
> >
> >> but wondered if there was a straightforward way of getting rid of it.
> >
> >> Any takers?
> >>
> >> My goal is to put a list of quote-delimited values for an IN() list
> >> into a macro variable so I can thereafter use it in a passthrough
> >> query (not shown ;-). This was working quite duckily until I added
> >> result_code values with the dreaded percent signs.
> >>
> >> Thanks!
> >>
> >> -Roy
> >>
> >> * ------------------ code ---------------------- ;
> >>
> >> data result_codes ;
> >> input
> >> @1 result_code $char9.
> >> @12 vdw_name $char10.
> >> ;
> >> datalines ;
> >> PSA*H PSA
> >> %FPSA*H PFPSA
> >> QCPSA*H PSA
> >> ;
> >>
> >> proc sql noprint feedback ;
> >>
> >> select result_code into :vdw_tests separated by '", "'
> >> from result_codes
> >> ;
> >>
> >> * None of the quoting functions I tried got rid of the error. ;
> >> %*let tsts = %nrbquote(&vdw_tests) ;
> >>
> >> reset print ;
> >>
> >> * In real life I am using the in-list in a pass-through query--this
> >> is just a sanity-check. ;
> >> select *
> >> from result_codes
> >> where result_code in ("&vdw_tests")
> >> ;
> >>
> >> quit ;
> >>
> >> Roy Pardee
> >> Research Analyst/Programmer
> >> Group Health Center For Health Studies (Cancer Research Network)
> >> (206) 287-2078
> >> Google Talk: rpardee
> >
> > Hey Roy,
> >
> > Use %nrstr();
> >
> > HTH
>
> _________________________________________________________________
> Make Windows Vista more reliable and secure with Windows Vista Service Pack
> 1.
> http://www.windowsvista.com/SP1?WT.mc_id=hotmailvistasp1banner
>
|