Tuesday, September 22, 2009

Deleting a Macro Variable

NOTE: symdel will NOT work on local macro variable.

%let a=yes;

data _null_;
      if symexist('a') then put '**** a exists';
          call symdel('a');
      if symexist('a') then put '**** a still exists';
          else put '**** a doesnt exist';
run;

**** a exists
**** a doesnt exist

NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

No comments: