BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi.

Is there a way of resetting macro variables without closing EG once you have run a process flow? Are there any SAS options that would reset the macro variables once the execution is completed either sucessfuly or not?

Thanks

Isa
2 REPLIES 2
deleted_user
Not applicable
Have you got a list of the macro variables? If so, you can write a code object to reassign null, zero or missing values as needed to these using %Let in open code statements, or in a data step with Call Symput() . Then call the code object as needed.

You can also interrogate the SQL Dictionary table for macro values, but this requires you can identify the macro symbols that you wish to null out.

There is also (since version 😎 a SAS macro function called %SymDel that will delete symbols from the symbol table. There is documentation on the support website and in the online help.

Kind regards

David
deleted_user
Not applicable
It appears that what you mention is resetting marcro variable as illustrated by a "%put _user_;" statement. However it does not reset the value of the input parameters(macro) window. From the tests I did, it seems that the behavior of macro variable included in traditional SAS code when executed in EG and input parameters is different. In fact, the macro variable (both in code or as entered as input parameters) are only resetted when EG is closed. In the Input parameter window, the value without default defined are resetted when the project is closed and putting %let statement resetting this macro variable at the end of the project does not reflect in the Input Parameters window.

My goal is to do both: resetting the macro variable value as well as resetting the input parameters window.

In addition, would you know if there is a limit to the number of Input parameters that can be assigned to a SAS program within EG?

Thanks

Isa

Message was edited by: Isa Message was edited by: Isa

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1007 views
  • 0 likes
  • 1 in conversation