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 (September 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 21 Sep 2010 11:37:46 -0700
Reply-To:     Sterling Paramore <gnilrets@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Sterling Paramore <gnilrets@GMAIL.COM>
Subject:      Re: what is wrong with this code?
In-Reply-To:  <AANLkTinUZjZ7T_9TSB2AgGdQ+XuGrokfmex3=pKwi4HB@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Yep, you definitely need to RTM (Read The Manual).

First off, the function you're looking for is lowcase. Second, the expression

if Variable="lowcase(&con.)" then do;

resolves to

if Variable="lowcase(Cat)" then do;

which is not what you're trying to evaluate. You need to put the quotes around &con.

-Sterling

On Tue, Sep 21, 2010 at 11:29 AM, Jeff <zhujp98@gmail.com> wrote:

> Thanks > I have one more question. > &con returns Cat > I want cat. > How can I do that? > The lowercase in this program does not work. > > > > data _null_; > set param.&desc.&con.; > if Variable="lowercase(&con.)" then do; > > call symput("cutoff", probt); > end; > run; > > > > On Tue, Sep 21, 2010 at 2:11 PM, Sterling Paramore <gnilrets@gmail.com>wrote: > >> You're getting the warning because call symput is never executed. I'm >> guessing you misspelled "variable" as "variabe". >> >> -Sterling >> >> On Tue, Sep 21, 2010 at 11:05 AM, Jeff <zhujp98@gmail.com> wrote: >> >> > %macro m; >> > data _null_; >> > set param.&desc.&con.; >> > if variabe="&con." then do; >> > call symput("cutoff", probt); >> > end; >> > run; >> > >> > %put &cutoff; >> > %if "&cutoff"<=0.05 %then %do; >> > data sigparam.&desc.&con.; >> > set param.&desc.&con; >> > %end; >> > run; >> > %mend; >> > >> > >> > >> > WARNING: Apparent symbolic reference CUTOFF not resolved. >> > &cutoff >> > WARNING: Apparent symbolic reference CUTOFF not resolved. >> > >> > NOTE: There were 18 observations read from the data set >> > PARAM.CONTINUEMPRLEVELC1I7. >> > NOTE: The data set SIGPARAM.CONTINUEMPRLEVELC1I7 has 18 observations and >> 9 >> > variables. >> > NOTE: Compressing data set SIGPARAM.CONTINUEMPRLEVELC1I7 decreased size >> by >> > 0.00 percent. >> > Compressed is 1 pages; un-compressed would require 1 pages. >> > NOTE: DATA statement used (Total process time): >> > real time 0.01 seconds >> > cpu time 0.01 seconds >> > >> > >


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