yzzhang 发表于 2010-11-30 09:45 
大家好,请问下如何删除宏变量和自定义输出输入格式?多谢了!
The local macro variables live with their scopes. You only need to take care of GLOBAL ones. Here is simple one to 'kill' them all.
%let a=a; %let b=b; %let c=c;
%put >>>&a &b &c<<<;
proc sql noprint;
DESCRIBE TABLE dictionary.macros;
select name into: mvarlist separated by ' '
from dictionary.macros
where scope ='GLOBAL' and not index(name,'SYS') ;
quit;
%put &mvarlist;
%symdel &mvarlist ;
%symdel mvarlist;
%put _all_;
*********************************************************************************
You can use proc catalog to kill all format/informat were defined in a library as,
proc format ;
value $wert
s=1
r=2
other=0
;
run;
data t1;
a='s';
put a $wert.;
run;
proc catalog cat=work.formats kill;
run;
data t1;
a='s';
put a $wert.;
run;