Date: Tue, 21 Sep 2010 13:42:30 -0500
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: what is wrong with this code?
In-Reply-To: <AANLkTik5x9_RBxyMcD6R5TZ9wUhwubK4kEkTZ8UV46US@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
How can a character value be less than a numeric value, among other things;
and macro variables don't use decimals in regular evaluations. You should
really be using a data step to work that out anyway.
What are you trying to achieve? Your code doesn't really make sense to me.
Are you trying to conditionally create a single dataset? If so then just do
the conditional bit in your first step, if nothing else...
-Joe
On Tue, Sep 21, 2010 at 1:37 PM, Jeff <zhujp98@gmail.com> wrote:
> Why %if "&cutoff"<=0.05 %then %do;
> can never be true?
> Thanks.
> Jeff
>
> On Tue, Sep 21, 2010 at 2:14 PM, Data _null_; <iebupdte@gmail.com> wrote:
>
> > Also this statement can never be true.
> >
> > %if "&cutoff"<=0.05 %then %do;
> >
> > Please, RTM regarding macro expressions.
> >
> > On Tue, Sep 21, 2010 at 1:05 PM, 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
> > >
> >
>
|