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 (August 2009, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 14 Aug 2009 10:59:34 -0700
Reply-To:   "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Subject:   Re: Why doesn't this macro delete the empty dataset?
Comments:   To: Laura Harmon <harmonl@WSIPP.WA.GOV>
In-Reply-To:   A<>
Content-Type:   text/plain; charset="us-ascii"

Hi Laura,

Long time no see. :o)

Add an ampersand to the %IF macro variable


Change %if _hasobs = 0 %then To %if &_hasobs = 0 %then

Hope this is helpful.

Mark Terjeson Investment Business Intelligence Investment Management & Research Russell Investments 253-439-2367

Russell Global Leaders in Multi-Manager Investing

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Laura Harmon Sent: Friday, August 14, 2009 10:52 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Why doesn't this macro delete the empty dataset?

I modified code from a prior sas-l posting from Jonathan Goldberg:

%macro tst;

%let _dsid = %sysfunc(open(tempc.Moduletypetoquestionanswerid));

%let _hasobs = %sysfunc(attrn(&_dsid, any));

%if _hasobs = 0 %then


proc datasets nolist library=tempc;

delete Moduletypetoquestionanswerid;



%let _dsid = %sysfunc (close(&_dsid));



But it isn't deleting tempc.Moduletypetoquestionanswerid, any advice? Thanks in advance for your help.

Laura Harmon

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