Date: Sun, 3 Sep 2006 18:46:48 -0400
Reply-To: Joe Whitehurst <joewhitehurst@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Whitehurst <joewhitehurst@GMAIL.COM>
Subject: Re: Macro string from Proc Sql
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
As I have said many times before, blah blah blah SAS Component
Lnnguage, blah blah blah Antiquated Macro Language blah blah blah!
On 9/3/06, Ian Whitlock <email@example.com> wrote:
> Just remember that the value looks good but it isn't. The outside
> single quotes remain quoted. You need
> to use the expression in most code. On the other hand,
> it might be better to standardize on double quotes around
> the values.
> Ian Whitlock
> Date: Thu, 31 Aug 2006 21:11:11 -0700
> Reply-To: dramage <dramage1@GMAIL.COM>
> Sender: "SAS(r) Discussion"
> From: dramage <dramage1@GMAIL.COM>
> Organization: http://groups.google.com
> Subject: Re: Macro string from Proc Sql
> Comments: To: sas-l
> In-Reply-To: <firstname.lastname@example.org>
> Content-Type: text/plain; charset="iso-8859-1"
> Try this:
> data test;
> input testvar $20.;
> proc print; run;
> proc sql;
> select testvar into: mvar separated by "','"
> from test;
> %let mvar=%str(%')&mvar%str(%');
> %put &mvar;
> email@example.com wrote:
> > Is there a method within this Proc Sql that I can get
> > the creation of a macro list to have to have a single
> > quote on both sides of the comma, so that final
> > macro string resluts in this string:
> > '01234','43210','56789','99999'
> > proc sql noprint ;
> > select zipnum into :zips separated by ',' from dataset1;
> > Thanks
To paraphrase G. Santayana, the SAS Macro Facility used by common SAS
programmers is an old mate that gives no pleasure and many headaches,
yet she/he cannot live without it, and resents any aspersions that
strangers may cast on its character