I refer to the SAS documentation every day. Usually, I want information about SAS syntax and the statistical formulas and algorithms for various options and statements. Although I have bookmarked common documentation books and chapters, sometimes it is easier to perform an internet search to find information. I've discovered a combination of search terms that usually find the information I need with one search. The trick works well with the most popular search engines, Google and Bing, but I suspect it will work equally well with DuckDuckGo and other search engines.
The Rolling Stones famously sang, "You can't always get what you want. But if you try sometimes, well, you might find, you get what you need." With this internet search trick, I find that I get what I need most of the time.
To illustrate why these tips are useful, suppose you want to search for information about the CORRB option on the MODEL statement in PROC REG. You might go to your favorite search engine and type in "PROC REG" CORRB. The results include links to old SAS documentation (SAS 8.2 and 9.1), links to discussion forums (StackOverflow), and a regression tutorial from UCLA. If you want to bypass those other sources go directly to the most recent SAS documentation, read on.
Two tips to improve your search for syntax and details
The key to searching the documentation is understanding how the SAS documentation is organized and how the documentation writers refer to syntax. Here are several tips for how to use an internet search engine to search the SAS documentation effectively:
- "SAS Help Center": Rather than search for a generic term like "SAS documentation," include the term "SAS Help Center," which is the name SAS gives to its online collection of documentation books. If you omit this term, you might find that your search engine returns results from older versions of SAS, such as SAS 9.2. To get the most current documentation, always start the search with "SAS Help Center".
- "XYZ Procedure": Although programmers colloquially refer to SAS procedures as "PROCs," the documentation system uses the term procedure. Thus, instead of searching for "PROC REG," search for "REG Procedure". Instead of searching for "PROC MEANS," search for "MEANS Procedure".
These two tips will go a long way to improving your ability to find the most recent documentation of SAS procedures. For example, try searching for the following terms:
- "SAS Help Center" "REG Procedure"
- "SAS Help Center" "MEANS Procedure"
Both searches result in links to the current documentation near the top of the search results. The links bring you to the syntax and details for the respective procedures. For me, the links typically resolve to the "SAS 9.4/Viya 3.5" version of the documentation, but you can easily change to more recent (or older!) versions of SAS by using the drop-down menu on the blue banner at the top of the web page.
You can, of course, restrict your search to the SAS documentation by using the site keyword, such as site:documentation.sas.com, but that technique does not ensure that you find the most recent documentation. I prefer using "SAS Help Center".
Searching for statements or options
Two more tips:
- option: Include the word 'option' when searching for a procedure option. For example, if you are interested in the CORRB option on the MODEL statement in PROC REG, use the search terms option CORRB to the previous search. For the most general search criterion, do not use quotes around these terms.
- statement: Procedures typically support many statements. If you are an experienced SAS programmer, you probably know the names of the statements, such as the CLASS statement, MODEL statement, OUTPUT statement, and so forth. Add a search term such as "MODEL statement" to your search criterion.
Searching for functions and subroutines
Sometimes I search for the documentation of functions or subroutines in the DATA step or in SAS/IML software. In those cases, append the word "function" or "call" to the end of the search string. For example, "SUM function" will find the documentation for the SUM function in both SAS/IML and the DATA step. "SVD call" will find the documentation for the SVD subroutine in SAS/IML.
I often want to focus my search queries on the most recent SAS documentation. Adding "SAS Help Center" to my internet searches usually enables me to view the most recent documentation for SAS procedures and functions. I've included a few other tips that usually result in a direct link to procedures, statements, options, functions, and subroutines.
For more tips and suggestions about SAS documentation:
- Introduction to the SAS Help Center
- How to discover what is new in each release of SAS
- Five features in the new Help Center