Creating Shortcuts to Online SAS

Jodie Gilmore, Freelance Technical Writer, Washougal, WA

ABSTRACT SASCOMP.HLP SAS Companion for Windows

Under Windows, you can use the SAS System's WINHELP function to AFDOC.HLP FRAME classes and methods create shortcuts to sections of the online SAS System help. For example, you can jump right to the How to ... contents, bring up the BASE.HLP SAS System main help contents (lists all online Search dialog box, or even jump to an individual topic. This paper documentation, Whafs New, the SAS gives several examples of using the W1NHELP function. Companion, etc.)

INTRODUCTION SASHOWTO.HLP How to ... with the SAS System under Windows

Although the WlNHELP function is often used to access help ftles you OPENING A CONTENTS FILE write yourself (such as for a SASIAF application), you can also use it to access the SAS System online help. To do so requires you to become Possibly the easiest way to use the WINHELP function is to use it to familiar with the SAS System help files, and may require a little trial open a contents listing for a help file. For example, to see the contents and error. But the effort is worth it because the WINHELP function can of the SAS/AF FRAME help, the syntax is make accessing a topic or contents list as quick as clicking a tool or pressing a function key. ("help contents", "c:\sas\core\winhelp\afdoc.hlp") In this paper, you'lIleam a little about the syntax of the WINHELP function and where the SAS System help files are stored. Then you can Jfyou assign this function to a tool, you get a list of the various classes use the examples to see how the W1NHELP function can be used to and methods you can use with fRAME entries with just one click of speed up access to SAS System online help. the mouse button (instead of having to navigate through four or five separate help windows to get there). WINHELP SYNTAX USING KEYWORDS TO DISPLAY TOPICS The WINHELP function has the following general syntax: You can jump to a particular help topic by using keywords in the WINHELP("method", "help-file", "method-ponti") WINHELP specification. For example, suppose you want quick access to the various OLE-related help topics. The following WINHELP Brietly, here is a description of each of the parameters: function specification opens a Topics List dialog box, from which you can choose the OLE topic: • method is a keyword that specifies the type of access you want, such as a contents list, a topics list, or a winhelp ("help key", specific topic. "e: \sas\core\winhelp\sascomp.hlp", "OLE")

Submitting this WINHELP function opens the dialog box shown in • help-file specifies the help file's name. Figure I.

• method-parm specifies different information, depending on which method you use.

This paper shows only a few method values (HELP_CONTENTS, HELP CONTEXT, and HELP KEY). For the complete syntax of the W1NHELP function refer to yo~ SAS manual or the SAS online help.

WHERE ARE THE HELP FILES?

SAS online help files are stored in the following folder:

C:\SAS\CORElWINHELP Figure 1. Topics Found Dialog Box In general, you'll be interested in only the files with a .HLP extension in this folder. If only one topic matches the keyword you specify, the topic is displayed directly, instead of the Topics Found dialog box. Here is a brief list of some of the help files and their topiCS. (There are many other help files-these are just some of the more commonly­ accessed ones).

80 ACCESSING THE SEARCH DIALOG BOX

For quick access to the Search dialog box, where you can search for any topic, use the HELP_KEY method and specify a blank search string, as follows: winhelp ("help key". "c:\sas\core\winhelp\sascomp.hlp", "")

This opens the Search dialog box (that is, the Index tab) for the SAS Companion help; to acceSS the Search dialog box for other help files, change the help file's name accordingly.

ASSIGNING THE WINHELP FUNCTION TO THE TOOLBAR AND FUNCTION KEYS

Of course, the WINHELP function can be used in the DATA step, like any SAS function. However, the real power of this function lies in asSigning it to a tool or a function key. Use the O/uSYSFUNC function to assign the W1NHELP function to a tool or key.

For example, suppose you want Fl2 to bring up the Topics Found dialog box for OLE-related topics. Open the KEYS window and type the following next to Fl2:

%sysfunc (winhelp (help_key, c:\sas\core\winhelp\sascomp.hlp,OLE))

Notice that when you use W1NHELP in the DATA step, you must quote the parameters; when you use it with O/uSYSFUNC, you do not quote the parameters.

You could also assign the %SYSFUNC command to a tool on the toolbar, using the EDIT TOOLS dialog box.

CONCLUSION

When you want help, you want it fast And sometimes getting to a particular online help topic requires seven or eight mouse clicks or double-clicks. Even if you define a bookmark, you must use at least three mouse clicks to get to it. Using the W1NHELP function to jump to topics you access often helps you work more efficiently.

SAS is a registered trademark or trademark ofSAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Other brand and product names are registered trademarks or trademarks of their respective companies.

The author can be reached at: Jodie Gilmore 32601 NE Ammeter Rd. Washougal, WA 98671 [email protected]

81