- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
macrHi there,
Is there any statement or method to delete a macro in a session? as like we use SYMDEL for deleting a macro variable.
for instance,
%macro test:
----
-----
%mend test;
Now I would like to kill the test macro from the session.
Many Thanks
Surendar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
%macro a;
%put y;
%mend a;
proc catalog catalog=work.sasmacr et=macro;
delete a;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
proc catalog catalog = sasmacr;
delete test /et = macro;
run;
quit;
- Tags:
- delete macro
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Not sure why this 6 year old thread has been re-activated, but there is now the %SYSMACDELETE macro statement for deleting compiled macros.
Here is a link to a macro that will make it easier to use that statement to delete multiple macros, including preventing you from trying to delete a macro you are currently running.
https://github.com/sasutils/macros/blob/master/macdelete.sas