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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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