When you create or update
a macro variable with the %LET statement, all macro processing takes
place before the execution of the DATA step. The SYMPUT routine enables
you to create or update macro variables during DATA step execution.
Depending on how the arguments are coded, you can create either a
single macro variable or multiple macro variables. You can use the
SYMPUT routine with literal strings to create a macro variable and
to assign either an exact name or an exact text value to it. You can
use the SYMPUT routine with a DATA step variable to assign the value
of that DATA step variable to a macro variable.
You can use the SYMPUTX
routine to create or update a macro variable during DATA step execution,
and to automatically strip leading and trailing blanks from the macro
variable name and value. You can also use a DATA step expression as
an argument to the SYMPUT routine in order to apply DATA step functions
to a value before you assign that value to a macro variable. The PUT
function is often useful in conjunction with the SYMPUT and SYMPUTX
routines.