************This macro becomes obsolete with new syfunc and getoption tools in later version of V6. To access a system option now in the macro env just use something such as: %let optval=%sysfunc( getoption()); /********************************************************************/ /* NAME: getopt PGMR: Blodgett */ /* FUNCTION: Retrieves value of SAS system option and assigns to */ /* &_opt (global macro var). Copies to another global macro var */ /* when name parm is specified. */ /* */ /********************************************************************/ /*---Update History: 9-2-98: coded. --- */ /********************************************************************/ /* BEGIN MACRO DEFINITION */ /********************************************************************/ %macro getopt( opt, /* required. Name of SAS system option to "get" */ name=, /* if specified then value of &_opt is copied to &name, a global macro variable (specified global in macro) */ list=0, /* specify list=1 to have value of parm displayed on log with %put*/ debug=0); %global _opt &name; proc sql noprint; select setting into: _opt from dictionary.options where optname=upcase("&opt"); quit; %if &name ne %str() %then %do; %let &name=&_opt; %end; %if &list %then %put &name= &_opt; %mend; /* ***********Sample Invocations************ %getopt(pagesize) %put _opt=&_opt; %getopt(dms,name=dms,list=1) ; %put &dms; *************** */