As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

Tip of the Day:April 30

From sasCommunity
Jump to: navigation, search

sasCommunity Tip of the Day

Some SAS sessions prepare the environment with unusual options. Sometimes I just want to know how it started. In recent releases, the GETOPTION() function reports CONFIG option value with the names of all the configuration files used in a way that is very suitable for a FILENAME statement. That makes it easy to report config file contents with code like what is shown at right.

filename cfg  %sysfunc( getoption( config )) ; 
data _null_;
  infile cfg;
  list; run;

This copies all the lines in all of the configuration files to the SAS log. The LIST statement wraps any long lines. Before the lines of each config file are the NOTEs defining what and where that file is located. Defining NO config option as I start SAS, it looks in the appropriate places and finds these files (here is the value returned by getoptions(config).

 ( "C:\Program Files\SASHome\x86\SASFoundation\9.3\sasv9.cfg"
   "C:\Program Files\SASHome\x86\SASFoundation\9.3\nls\en\sasv9.cfg"
   "D:\Peter\Documents\my sas files\sasv9.cfg" 

See also: Configure Your Foundation SAS® Client Easily and without Risk

Submitted By peterC (talk)

Feel free to comment on this tip.

Prior tip - Next tip - Random Tip

Submit a Tip