How to delete a Macro in a session? ( not macro variable)

Reply
Contributor
Posts: 46

How to delete a Macro in a session? ( not macro variable)

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.

Super Contributor
Posts: 490

Re: How to delete a Macro in a session? ( not macro variable)

Posted in reply to suraestar

Check this old thread

you can use Proc Catalog

Example:

proc catalog catalog=work;

delete test / et=macro;

quit;

Super Contributor
Posts: 308

Re: How to delete a Macro in a session? ( not macro variable)

Posted in reply to suraestar

Hello,

%macro a;
%put y;
%mend a;

proc catalog catalog=work.sasmacr et=macro;
delete a;
run;

Ask a Question
Discussion stats
  • 2 replies
  • 225 views
  • 0 likes
  • 3 in conversation