Date: Thu, 1 Apr 2010 15:18:35 -0400
Reply-To: Jack Clark <jclark@HILLTOP.UMBC.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Clark <jclark@HILLTOP.UMBC.EDU>
Subject: Re: Calling Macro
Content-Type: text/plain; charset="us-ascii"
Try the CALL EXECUTE routine to call your macro in the DATA Step.
if &yesobs > 0 then call execute('%process_dates(data=TEST)');
Senior Research Analyst
University of Maryland, Baltimore County
Sondheim Hall, 3rd Floor
1000 Hilltop Circle
Baltimore, MD 21250
Please consider the environment before printing this email and/or any attachments.
Confidentiality Notice: This e-mail may contain information that is legally privileged and that is intended only for the use of the addressee(s) named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying of this e-mail, distribution, or action taken in reliance on the contents of this e-mail and/or documents attributed to this e-mail is strictly prohibited. If you have received this information in error, please notify the sender immediately by phone and delete this entire e-mail. Thank you.-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of SAS
Sent: Thursday, April 01, 2010 2:30 PM
Subject: Calling Macro
I have to run a Macro based on a condition , that only If rows exist in
data set then execute macro.
This is how I am checking the data set whether any rows exist or Not .
call symputx('yesobs',not eof);
set TEST_DATASET end=eof;
In the output , I am able to see 0 , when I try to open the
it shows 0 observation.
But in the following condition , even though I am checking for value > 0
the Macro is getting executed
if &yesobs > 0 then
Can someone please let me know what Is the Issue and how to resolve this
Thanks In Advance,