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 (November 2011, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 17 Nov 2011 16:43:29 -0500
Reply-To:     Tom Abernathy <tom.abernathy@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Tom Abernathy <tom.abernathy@GMAIL.COM>
Subject:      Re: clear SASMACR before submitting code

I have also found that MRECALL is required. SAS must remember somewhere else that it once had a definition for that macro so without MRECALL it does not go out to the path(s) specified in the SASAUTOS option and look for the macro again.

On Thu, 17 Nov 2011 16:19:04 -0500, Quentin McMullen <> wrote:

>Hi, > >I'd be interested to hear if you have any problems with manually >deleting macros this way. > >I was playing with a similar approach earlier this year. I had a >macro %ResetSession() that tried to set the environment to the >"default" (so deleted work datasets, librefs, etc.) > >I found that when I deleted the macros using PROC CATALOG, I would >intermittently have problems where a macro that existed in the >autocall library would not be (re)compiled after the compiled macro >was deleted from SASMACR. So I ended up turning on mrecall, and that >fixed the problem. But I don't think mrecall should have been >necessary, and I was nevery happy with the "solution". > >I see that 9.3 has a new macro statement: %SYSMACDELETE . Haven't >played with it, but that might be a "safer" way to delete macro >definitions.... > >--Q. > > >On Thu, Nov 17, 2011 at 2:13 PM, Bolotin Yevgeniy ><> wrote: >> That only works if the macro definition could not be found (it will keep >> looking for it) >> >> If the macro has already been loaded into SASMACR, mrecall has no effect >> :( >> >> >> -----Original Message----- >> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of >> Fehd, Ronald J. (CDC/OCOO/ITSO) >> Sent: Thursday, November 17, 2011 1:09 PM >> To: SAS-L@LISTSERV.UGA.EDU >> Subject: Re: clear SASMACR before submitting code >> >> proc options define value option= mrecall; >> >> may be simpler for your needs than deleting the catalog. >> >> Ron Fehd macro maven >> >>> -----Original Message----- >>> From: >> [] >>> On Behalf Of Bolotin Yevgeniy >>> Sent: Thursday, November 17, 2011 11:30 AM >>> To: >>> Subject: clear SASMACR before submitting code >>> >>> My google-fu is weak this morning... >>> >>> >>> I want to execute the following statement whenever I run any code >> (using >>> F3, or the run button, or whatever - figuring out at least one will >> allow me to >>> do all): >>> >>> proc catalog CATALOG=sasmacr et=MACRO force kill; quit; >>> >>> (that is, delete all macros in the SASMACR library, to ensure all >> autocalls get >>> properly reloaded before the run) >>> >>> >>> however, mapping it to the RUN button doesn't work*, and I can't >> figure out >>> how to make it run (rather than insert) using the keyboard macro >>> functionality >>> >>> *i.e. if the button has "proc catalog CATALOG=sasmacr et=MACRO force >> kill; >>> quit; SUBMIT;" then only the submit will work. Oddly enough, "%put >>> a;SUBMIT;" will print the "a" before executing code, but I thought I'd >> toss >>> the question out there before digging into it myself :P >>> >>> >>> >>> So, really, two questions: >>> 1) how can I do this? >>> 2) will this break partial submits? (e.g. if I forget to select the >> "%mend;" >>> when running a macro declaration and then do that as a separate run, >> will >>> the proc catalog become part of the macro definition?) (it doesn't >> with the >>> "%put a;", but who knows) >>

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