Date: Thu, 5 Feb 2009 12:35:35 -0600
Reply-To: "./ ADD NAME=Data _null_;" <iebupdte@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "./ ADD NAME=Data _null_;" <iebupdte@GMAIL.COM>
Subject: Re: How do I programatically check for macro-quoting?
Content-Type: text/plain; charset=ISO-8859-1
Maybe another possibility is to look for delta characters in the
values by viewing through SASHELP.VMACRO or DICTIONARY.MACROS .
214 %let amIQuoted = Don%str(%')t Know;
215 %put NOTE: AMIQUOTED=&amIQuoted;
NOTE: AMIQUOTED=Don't Know
217 data _null_;
218 set sashelp.vmacro(where=(scope='GLOBAL'));
219 put name= value=hex32.;
220 *Write code to look for delta characters;
221 *I don't know all the delta characte values;
'01 11 02'x looks like (quote ' endquote)
But do you need to know? Could you just SUPERQ everything an not worry
On 2/5/09, Mike Rhoads <RHOADSM1@westat.com> wrote:
> Off the top of my head, I would write a second macro to call the macro being tested.
> Write the calling macro to pass arguments in such a way that the result being returned is one where macro quoting would make a difference (e.g., CA OR WA IN), and then have it use the returned value in a way that would break the subsequent macro code if the result was not quoted (after a %IF, perhaps).
> Mike Rhoads
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of RolandRB
> Sent: Thursday, February 05, 2009 11:52 AM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: How do I programatically check for macro-quoting?
> If it is a requirement of a macro to return a result macro-quoted, and I am testing this macro, then how do I programatically check for macro- quoting?