LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 24 Dec 2003 00:14:24 -0000
Reply-To:     Roland <roland@RASHLEIGH-BERRY.FSNET.CO.UK>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Roland <roland@RASHLEIGH-BERRY.FSNET.CO.UK>
Organization: Universe Monitors
Subject:      Re: gluing single quote to mvar contents using %LET

"Terjeson, Mark" <TERJEM@DSHS.WA.GOV> wrote in message news:592E8923DB6EA348BE8E33FCAADEFFFC0260641B@dshs-exch2... > Hi All, > > re: Looking for a more eligant syntax > to glue a single quote on the front > and back of macro variable contents. > > I've done not so pretty methods, but am > missing a more eligant and concise way. > > > e.g. > > %* original macro variable contents ; > %* which is missing leading&trailing ; > %* single quote characters ; > %let mvar=a','b','c; > > > %let mvar='&mvar.'; * obviously is not going to resolve ; > > > %put &mvar; > > would like results to be: 'a','b','c' > > > Thanks in advance, > Mark

1 %let mvar=a','b','c; 2 %let mvar=%str(%')&mvar%str(%'); 3 %put &mvar; 'a','b','c'


Back to: Top of message | Previous page | Main SAS-L page