<!-- m --><a class="postlink" href="http://groups.google.com/groups?q=macro+variable+delete&start=20&hl=en&lr=&ie=UTF-8&safe=off&selm=3819ACA2.5FB4%40capitale.qc.ca&rnum=24">http://groups.google.com/groups?q=macro ... ca&rnum=24</a><!-- m -->
%if %str(&nm) = %str( ) or %upcase(&nm) = _ALL_
%then
%let where = %str( );
%else
%let where = %str(and name = "%upcase(&nm)");
%*Save macro symbol table size ;
%let savtbmx = %sysfunc(getoption(msymtabmax));
%*redirect macro memory to disk;
options msymtabmax=0 ;
%*Force Write of macros to disk;
%*And at end delete macro catalog;
data _null_;
set sashelp.vmacro end=end;
call symput(name,' ');
where scope='GLOBAL' &where ;
if end
then do;
call execute("proc catalog catalog=work.sasst0 kill;quit;");
call execute("options msymtabmax=&savtbmx;");
end;
run;
%*;
%mend;