Desktop productivity for business analysts and programmers

Resetting macro variable within EG

Reply
N/A
Posts: 0

Resetting macro variable within EG

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
N/A
Posts: 0

Re: Resetting macro variable within EG

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 8) 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
N/A
Posts: 0

Re: Resetting macro variable within EG

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
Ask a Question
Discussion stats
  • 2 replies
  • 120 views
  • 0 likes
  • 1 in conversation