⨳ getOption ⨳

2014 Aug 18, Monday

⨳ 1 minute read ⨳ 71 words ⨳ sassas macrosystem 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;

getOption - August 18, 2014 - Richard Koopmann