Tip of the Day
sasCommunity Tip of the Day
You can use the GETOPTION function to query for the current value of an option. And if you wrap the call the GETOPTION function with the %SYSFUNC macro, you can save the value in a macro variable to it can be easily restored. For example, the following will enable you to use NOCENTER NONUMBER NODATE for some output and then reset the values back to their original values:
%let saveOptions = %sysfunc(getoption(CENTER)) %sysfunc(getoption(NUMBER)) %sysfunc(getoption(DATE)); options nocenter nonumber nodate; /* your code that depends on these options */ options &saveOptions; /* reset options to original values */
Submitted By Don Henderson
Feel free to comment on this tip.
Tips Index by Status
The Tip of the Day Project
A new technical Tip of the Day related to SAS software will be shown on this page and the sasCommunity.org main page every day. Before getting started, you can Browse and Search the current list of tips contributed by users.
Anyone can participate. We hope you do! Here's how:
- Submit a Tip by posting a SAS tip that you think others might find useful
- Review a Tip prior to publishing