Your SAS programs, embedded in web apps and elsewhere

Set a Macro Variable to the Equivalent of Not Set

Accepted Solution Solved
Reply
Super Contributor
Posts: 497
Accepted Solution

Set a Macro Variable to the Equivalent of Not Set

In SAS 9.2, Is there a way to set a macro variable to the equivalent of not set.

I have a condition %if &var1 eq %then

When accessing this going through the first time the page loads it works fine.  When I recall the page var1 is set from the previous time the page loaded and the condition is false.  Dropping the macro variable at the start of the proc if it exists would work too.


Accepted Solutions
Solution
‎06-17-2015 04:10 PM
Super User
Posts: 11,343

Re: Set a Macro Variable to the Equivalent of Not Set

Posted in reply to DavidPhillips2

%Let var1=;

should do it.

View solution in original post


All Replies
Solution
‎06-17-2015 04:10 PM
Super User
Posts: 11,343

Re: Set a Macro Variable to the Equivalent of Not Set

Posted in reply to DavidPhillips2

%Let var1=;

should do it.

Super Contributor
Posts: 497

Re: Set a Macro Variable to the Equivalent of Not Set

Thanks Ballardw

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 446 views
  • 0 likes
  • 2 in conversation