Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mf_mval.sas
Go to the documentation of this file.
1/**
2 @file mf_mval.sas
3 @brief Returns a macro variable value if the variable exists
4 @details
5 Use this macro to avoid repetitive use of `%if %symexist(MACVAR) %then`
6 type logic.
7 Usage:
8
9 %if %mf_mval(maynotexist)=itdid %then %do;
10
11 @param [in] var The macro variable NAME to return the (possible) value for
12
13 @version 9.2
14 @author Allan Bowe
15**/
16
17%macro mf_mval(var);
18 %if %symexist(&var) %then %do;
19 %superq(&var)
20 %end;
21%mend mf_mval;