Tip of the Day

From sasCommunity
Jump to: navigation, search

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.


Prior tip - Next tip -- Random Tip

Submit a Tip


 

Tips Index by Status

Currently in Use | Yet to be Scheduled | Still Under Review | Tip Awaiting Refinement

Search Tips:


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:

  1. Submit a Tip by posting a SAS tip that you think others might find useful
  2. Review a Tip prior to publishing
This effort is similar to, and was motivated by, the WikiPedia Tip of the Day Project. Please tell us what you think