Search notes:

SAS programming: function symget

symget gets the value of a macro variable at code execution time.
/*
   symput assigns a value to a macro variable.

   Note: the assigned value cannot be used in the same data step, because
   the macroprosses must be invoked again to resolve it.
*/

%let tq84_macro_var = hello world;

data _null_;
  call symput("tq84_macro_var", """good bye""");
  put &tq84_macro_var;
  /* Prints: hello world */
run;

data _null_;
  put &tq84_macro_var;
  /* Prints: good bye */
run;
Github repository about-SAS, path: /programming/call-routines/symput.sas

See also

SAS: Interaction between macros and data steps with execute, symget and symput
symput
functions

Index