getOption
Monday, 18 August, 2014
⨳ 1 minute read ⨳ 71 words ⨳ sas ⨳ sas macro ⨳ system options ⨳SAS has a number of system options that we can access through dictionary tables (or sashelp v-tables) or with the built-in getoption
function.
For a given option, I’d like to be able to return the value through a macro call. Something like line_width=%getOption(LINESIZE);
.
%macro getOption(optname);
%global getOption_value;
%let getOption_value=Specified option not found;
data _null_;
call symput('getOption_value', getoption("&OPTNAME"));
run;
&getOption_value;
%mend;