Exploring SAS Macro functions – eval and sysevalf

eval and sysevalf

EVAL and SYSEVALF are the two macro functions that evaluate arithmetic expressions and logical expressions. %EVAL The %EVAL function is used to evaluate integer arithmetic or logical expressions. The argument passed in the %EVAL function is converted from character to numeric and the results are converted back to character. All parts of the macro language …

Read moreExploring SAS Macro functions – eval and sysevalf

Creating macro variables from SAS dataset

macro variables from sas dataset

Macro variables in SAS are used extensively for reusing codes. You can create a multi-usable program in which analysis of variables can be controlled by updating the values of macro variables.
SAS provides an elegant solution to overcome these problems with the CALL SET routine. You can convert data step variables into macro variables with a few lines of code using the %SYSCALL SET routine. This routine also allows you to convert and process one observation of data step variables at a time thus saving memory usage.