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


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


Searching for word in dictionary.options

From sasCommunity
Jump to: navigation, search

Problem: You can't remember the name of a SAS system option, but you remember part of the name.

This code will search for a word in options name, setting, or description.

%Let Word = Margin;
%*Let Word = Memory;
%Let Word = %Upcase(&Word.);
PROC SQL; select Group, OptName ,Setting ,OptDesc
          from   Dictionary.Options
          where  index(upcase(OptName),"&Word.")
             or  index(upcase(Setting),"&Word.")
             or  index(upcase(OptDesc),"&Word.");
          quit;

Result (from Version 9.1.3 for Windows):

 Option Name        Option Setting       Option Description
 ----------------------------------------------------------------------
 BOTTOMMARGIN       0.000 IN             Bottom margin for printed
                                         output
 LEFTMARGIN         0.000 IN             Left margin for printed output
 RIGHTMARGIN        0.000 IN             Right margin for printed
                                         output
 TOPMARGIN          0.000 IN             Top margin for printed output


You could also look at the [list of options] in the online documentation and use the web browser's search feature to look for "margin". Another possibility is to open SASHELP.VOPTION in VIEWTABLE and use the tools provided there to isolate appearances of the string "margin".

2012-Apr-25 Ron.Fehd.macro.maven comments: The SAShelp views are deprecated because they are so slow. Note if you do an sql describe view, you'll see that the views are derived from sql dictionaries.

PROC SQL; describe view sashelp.voption;
          quit;

Next step: examine group and one option.

NOTE: SQL view SASHELP.VOPTION is defined as:
        select *
          from DICTIONARY.OPTIONS;
run;

Tiny Url: http://tinyurl.com/5zwfax

--macro maven == the radical programmer 09:57, 5 May 2008 (EDT)