DATA Step, Macro, Functions and more

Deleting macro variables

Reply
Frequent Contributor
Posts: 139

Deleting macro variables

All

I know how to find and delete macro variables from the global symbol table with %symexist and %symdel.

For example:
%if %symexist(NewFileName) %then %symdel NewFileName;

But how can I search for the existance and delete a macro variable from a local symbol table. I'm at a loss.

Any ideas?
-Darryl
Super Contributor
Posts: 273

Re: Deleting macro variables

Posted in reply to darrylovia
Sas local macro variable are disapearing as soon the macro is executed!

Andre
N/A
Posts: 0

Re: Deleting macro variables

It's supposed to, by design.

Locals local to the macro and are equivalent to stack variables.

If you need persistence, then use a global variable.
Ask a Question
Discussion stats
  • 2 replies
  • 139 views
  • 0 likes
  • 3 in conversation