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 (July 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 20 Jul 2004 10:39:28 -0400
Reply-To:   "Chen, Jian" <OZZ6@CDC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Chen, Jian" <OZZ6@CDC.GOV>
Subject:   Re: Macro question
Comments:   To: "DePuy, Venita" <depuy001@DCRI.DUKE.EDU>
Content-Type:   text/plain; charset="us-ascii"

I am sorry, the last statement meant to be:

%test1(AC);

How could I explain the error.

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of DePuy, Venita Sent: Tuesday, July 20, 2004 10:28 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Macro question

I believe you need to say: %test1(tribe2=value); you're writing the macro to call in the variable tribe2, but then not calling it in. Venita

> ---------- > From: Chen, Jian[SMTP:OZZ6@CDC.GOV] > > Could some one explain why the following macro doesn't work? The > problem is with variable emplty03. > > %macro test1(tribe2); > %if %sysfunc(exist(&tribe2.nhanes03))=0 %then > %do; > %let emplty03=1; > data &tribe2.nhanes03; > set _null_; > run; > %end; > > %if &emplty03=1 %then > %put data not available; > > %mend; > > %test1; > > LOG: > A character operand was found in the %EVAL function or %IF condition > where a numeric > operand is required. The condition was: &emplty99=1 and > &emplty00=1 and &emplty01=1 and > &emplty02=1 and &emplty03=1 > > > > How could I check if a dataset is _null_? > > I need to check if a dataset(one) is _null_, I do the following: > > If one=_null_ then ... > > It doesn't seem to work that way. >


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