SAS 9.1 Companion for Windows (2 Volumes)

Selecting Fonts

To change the font for button text and descriptive text elements, use the SYSGUIFONT system option either in the configuration file or at the command prompt when you start SAS.

To choose a different font or point size for text in SAS windows , open the Fonts dialog box by using the DLGFONT command or by selecting

Tools – Options – Fonts

To change the font in the Enhanced Editor, select

Tools – Options – Enhanced Editor

and click the Appearance tab.

The fonts that are available for SAS windows depend on the monospace fonts that you have installed under Windows. For example, you might have the Courier font and Lucida Console font available.

When you select a font or point size, the Font dialog box and the Enhanced Editor Options dialog box display a sample of the font that you have selected. For more information about selecting fonts for the Enhanced Editor, select

Help – Using This Window

or press F1 when the Enhanced Editor is the active window.

When you install SAS, the Setup program automatically installs a TrueType font, named SAS Monospace, that is designed specifically for use with SAS. This font, in combination with the Sasfont display font, ensures that tabular output is formatted properly whether you view it in the Output window, print it, or copy it to another Windows application.

By default, SAS uses the SAS Monospace font to produce printed output. In addition, any text that you cut, copy, or drag from a SAS window to paste into another Windows application will be formatted with the SAS Monospace font.

You cannot use the Fonts item to select SAS/GRAPH fonts.

CAUTION:

Setting Session Preferences

Introduction to Setting Session Preferences

You can configure your SAS session to accommodate the way that you like to work. For example:

The following sections describe the Preferences dialog box and how to use these settings to control your SAS session.

Using the Preferences Dialog Box

To customize your SAS session, open the Preferences dialog box in one of the following ways:

The Preferences dialog box contains tabs that separate the session settings into categories. Click the tabs for each sheet to navigate to the settings that you want to change, and then select the options that you want. When you are finished, click OK .

The settings that you select are saved from session to session in the Sasuser.Profile catalog by their respective pages, except for the Results tab. The entries in the Sasuser.Profile are GENWSAVE, VIEWWSAVE, EDITWSAVE, WEBWSAVE, and ADVWSAVE. The Results tab settings are saved in the SAS registry, so they are not moved to another machine when the Sasuser.Profile catalog is copied .

Display 2.4: Preferences Dialog Box (showing the General tab)

General Preferences

The General tab enables you specify the general options that control how your SAS session works. The following are the General options:

Recently used file list

Confirm exit

Save settings on exit

Submit contents of file opened

Mail current window as attachment

View Preferences

The View tab lets you specify the options that control the appearance of your SAS session. The View options include

Window

Show

Edit Preferences

The Edit tab controls options that affect the SAS text editors, including:

Overtype mode

Autosave every n minutes

Enable unmarking with navigation keys

Use Enhanced Editor

Results Preferences

The Results tab enables you to configure how you would like to view your program output results. The Results tab options include the following:

Listing

HTML

View results as they are generated

View results using

Web Preferences

The Web tab enables you to specify your preferred Web browser for use within your SAS session. These preferences are used whenever you issue the WBROWSE command (either directly or by selecting a Help menu item or toolbar button that issues the command). For more information, see WBROWSE Command on page 356. You can specify the following Web options:

Preferred browser

Start page

Advanced Preferences

The Advanced tab enables you to specify options that can affect your SAS session, including scrolling policy and other miscellaneous behavior. The Advanced options include

Scrolling Options

Other

Customizing Your Windowing Environment with Commands

Customizing Window Positions

In the default display configuration of an interactive session (shown in Figure 2.1 on page 33) the main SAS window displays the Explorer and Results windows as docked windows, and the Log, Enhanced Editor, and Output windows in the remaining SAS workspace.

Using the Windows menu, you can position SAS windows in the same manner as other Windows applications:

While the default configuration is sufficient for efficient SAS use, you may want to open a few more windows for easy access and rearrange the windows within the main SAS window. For example, you may want to keep the My Favorite Folders window open, but minimized, and the windows arranged in a mosaic pattern so you can see all of them at once.

To accomplish this configuration

  1. Open the My Favorite Folders by selecting

    View – My Favorite Folders

  2. Select the minimize button in the window title bar for the My Favorite Folders window

  3. Select

    Windows – Tile Vertically

The following display shows the resulting main SAS window:

Display 2.5: Customized SAS Session

In addition, you can undock windows so that all windows can be positioned where you want them or you can minimize the docking view. For more information about the docking view, see Using the Docking View on page 35.

For a list of SAS commands used to control the appearance of the main SAS window, see SAS Commands That Control the Main SAS Window on page 316.

Changing the Window Colors

Changing the color of window components is a shared responsibility of Windows and SAS. You change the color of most standard window parts by changing the properties of the Windows desktop. Several window element colors are controlled by SAS (such as the color of error message text in the Log).

To change a window component that is controlled by SAS do one of the following

Use the SASCOLOR window to choose the colors for specific elements.

Close and reopen any active windows for new color settings to take effect.

For more information, see the SAS Help and Documentation for the SASCOLOR window.

Customizing Your Windowing Environment with System Options

Several SAS system options are available to control the default windowing environment within SAS. The most commonly used options are the following:

AWSDEF

AWSTITLE

HELPREGISTER

ICON

REGISTER

SASINITIALFOLDER

SPLASHLOC and NOSPLASH

USERICON

WEBUI

These system options can be specified in your SAS configuration file or in the SAS command when you start SAS from a command prompt. Some are also valid in an OPTIONS statement. For details about the syntax of these options and about where you can specify them, see SAS System Options under Windows on page 467. For a comprehensive list of these options, see SAS System Options That Control the Main SAS Window on page 315.

Changing the Size and Placement of the Main SAS Window

The AWSDEF system option enables you to control the placement and size of the main SAS window when SAS initializes. If you want your SAS session always to occupy the upper-left quarter of your screen, specify the following AWSDEF option in your SAS configuration file:

-awsdef 0 0 50 50

For more information, see AWSDEF System Option on page 487.

Changing the Title of Your SAS Session

By default, the main SAS title bar contains the text SAS . If you want a different title, you can use the AWSTITLE system option. For example, to set the title to My SAS Session , specify the following option in your SAS configuration file:

-awstitle "My SAS Session"

For more information, see AWSTITLE System Option on page 489.

Adding Help to the Help Menu

The HELPREGISTER system option enables you to access customized help from the main SAS window Help menu. You can add up to 20 WinHelp (.hlp), HTML (.htm), or Microsoft HTML Help (.chm) files to the Help menu. HELPREGISTER system option arguments enable you to

To add multiple Help files to the Help menu, use multiple HELPREGISTER system options either in your configuration file or at the command prompt when you start SAS.

The following example adds the Help file My Help.htm to the Help menu:

sas -helpregister "My Help" c:\mysashelp\myHelp.htm html

For more information, see HELPREGISTER System Option on page 509.

Minimizing Your SAS Session

The ICON system option causes SAS to be minimized at invocation. If you are running a batch job, you might want to use this system option to save space on your screen. For more information, see ICON System Option on page 513.

Adding Applications to the Tools Menu

The REGISTER system option enables you to add names of applications to the Tools pull-down menu of the main SAS window. You can execute one of these applications by clicking its name. The REGISTER system option takes as arguments a menu name and an operating environment command or a path specification for an executable file. You can also specify a working folder.

The following is an example that adds a command to print the contents of the SAS folder:

-register "Contents of SAS" "dir c:\program files\sas"

When you click Contents of SAS in the Tools pull-down menu, the output of the Windows DIR command is displayed in a command prompt window.

The following is an example of adding an .EXE file to the menu along with a specification of a working folder of C:\EXDATA:

-register "Excel" "excel.exe" "c:\exdata"

This adds Excel to the menu. When you click Excel , the file EXCEL.EXE is invoked.

The REGISTER system option is valid only as an invocation option (that is, in a SAS configuration file or in the SAS invocation command). For more information, see REGISTER System Option on page 539.

Setting the Initial Path For the Current Folder and the Paths Specified in the Open and Save Dialog Boxes

If you want to start SAS with a current folder other than the default current folder, use the SASINITIALFOLDER system option when you start SAS. The pathname that you specify in the SASINITALFOLDER option sets the initial current folder as well as the initial pathname for the Open and Save As dialog boxes.

You can specify the SASINITIALFOLDER option either on the command line when you start SAS or in a configuration file. For example, you might specify sas -sasinitialfolder "c:\mySasFiles" to start SAS.

For more information, see SASINITIALFOLDER System Option on page 546.

Displaying a Custom Logo Screen during SAS Invocation

To display your own logo when SAS starts

  1. Create the logo that you want to display and save it either as a Windows bitmap (which has a .bmp file extension), or compile it as a resource and build it into a dynamic link library.

  2. When you invoke SAS, specify the -SPLASHLOC system option with the full pathname of the file that contains your bitmap. If the bitmap is in a DLL, you must specify the resource number as well. The default resource number is 1.

For example, if your logo is stored in C:\MYBMPS\SPLASH.BMP specify the following SPLASHLOC system option:

-splashloc c:\mybmps\splash.bmp

If your logo is stored in C:\MYDLLS\OPENING.DLL as resource 101, you specify the following SPLASHLOC system option:

-splashloc c:\mydlls\opening.dll 101

For more information, see SPLASHLOC System Option on page 558.

Adding User-Defined Icons to SAS

The USERICON system option enables you to add your own icons to SAS. These icons can be used with SAS/AF and SAS/EIS applications. The syntax for the USERICON system option is as follows :

The icon-resource-file argument specifies the full path to a dynamic link library (DLL) file that contains the user icons. The number-of-icons argument specifies the number of icons found in the resource file. For example, the following system option specifies that there are four icons located in an icon resource file named ICONS.DLL found in the C:\JUNK folder:

-usericon c:\junk\icons.dll 4

The DLL that is used as the icon resource file must be created using the Win32 Software Development Kit (and must therefore be 32-bit). For more information about how to build a resource file, refer to the documentation for the Microsoft Win32 Software Development Kit.

You can incorporate icons into your SAS/AF and SAS/EIS applications using a FRAME entry. For more information, see USERICON System Option on page 571 and refer to the SAS Help and Documentation for SAS/AF software and SAS/EIS software.

Enabling Web Enhancements in SAS

If you have Microsoft Internet Explorer 5.0 (IE) or greater installed, the WEBUI system option enables some SAS windows, such as the SAS Explorer window, to work like an IE web page where pointing to an object selects the object and a single mouse-click invokes the default action.

To select a range of objects, press and hold down the SHIFT key, and point to the first and last objects in the group .

To select multiple items, press and hold down the CTRL key, and point to individual items in the group.

Customizing the Toolbar

Introduction to Customizing the Toolbar

SAS assigns several commonly used commands to the buttons for your convenience. You might find that the commands you use most often are different than the ones assigned to the toolbar by default. Or, you might want to create a toolbar to use with a specific application window. This section describes how to customize the toolbar settings.

Using the Customize Tools Dialog Box

You customize all toolbar settings using the Customize tools dialog box. To open the Customize Tools dialog box, do one of the following:

Use the Toolbars tab for general toolbar settings and the Customize tab to define tools on the toolbar.

Setting General Toolbar Preferences

The Toolbars tab has settings to control the behavior and appearance of the toolbar. Tool options include:

General

Toolbars

When you have configured the Toolbars tab, either click Customize to complete your customization or click OK to close the dialog box.

Customizing a Toolbar

The Customize tab, as shown in the following display, enables you to add, delete, and modify commands on the toolbar.

Display 2.6: Customize Tab of the Customize Tools Dialog Box

The following explains each of the buttons (commands) and fields:

Open

Save

Restore

Title

Add a tool

Remove tool

Change icon

Move tool up

Move tool down

Cut

Copy

Paste

Command

Help Text

Tip Text

Toolbar list

Adding a Tool to the Toolbar

To add a tool to the toolbar:

  1. Do one of the following:

    • Click the Add tool button to add a blank tool to the toolbar list. Enter a SAS command in the Command box.

    • For windows that have a set of predefined tools, such as the Explorer window or the My Favorite Folders window, click the Add tool down arrow and select Action . From the Add Action dialog box, select an action. This adds a new action to the toolbar. You can enter multiple commands separated by semicolons.

    • Click the Add tool down arrow and select Separator to add a separator to the toolbar list.

  1. Click the Bitmap Browser button to select an icon for the tool. When you have selected an icon, click OK .

  2. Type Help text in the Help Text box.

  3. Type ScreenTip text in the Tip Text box.

  4. Position the tool in the toolbar list by clicking the Move tool up and Move tool down buttons.

  5. When you are finished, click Save. In the Save Tools dialog box, type the library, catalog, and toolbox name. Then click OK .

Display 2.7: Bitmap Browser Dialog Box

Removing a Tool from the Toolbar

To remove a tool from the toolbar:

  1. Select the tool in the toolbar list that you want to remove.

  2. Click Remove tool.

  3. When you are finished, click Save.

Customizing and Saving a Toolbar for Use with a Particular Application or Window

Before you add a command to a toolbar, ensure that the command is available from a pull-down menu. Buttons are enabled only if the command is available from a pull-down menu, with the exception of the Print and Copy commands, which are always enabled.

Use the following procedure to customize a toolbar to use with a particular application or window:

  1. Click in the application or window to make it the active window.

  2. Customize the toolbar by adding and removing tools as described in previous sections.

  3. When you are finished customizing the toolbar, click Save. The Save Tools dialog box appears (as shown in Display 2.8 on page 71).

    Display 2.8: Save Tools Dialog Box

  4. SAS completes the libref, catalog, and entry fields. Select the Save tools for window check box, where window is the active window, and then click OK .

    When you select the Save tools for window check box, the toolbar is associated with the particular application or window by using the same library, catalog, and entry name as the PMENU entry for the application or window. SAS first looks for toolbox entries in Sasuser.Profile before searching the application catalog.

If you save the toolbar so that it is associated with a particular application, SAS automatically loads the tools when that application s window is active.

You can use the TOOLLOAD command to load your custom toolbar manually. For more information, see TOOLLOAD Command on page 352.

Resetting the Tools to the Default Settings

To restore a toolbar to its default settings, click Restore Defaults. SAS asks you to confirm that you want to restore to the default tool settings. When you click Yes , the tools are reset to their original settings (the settings that were in place when SAS was installed).

If a SAS application defines a default toolbar for its application window, clicking the Restore Defaults button restores the settings for that toolbar.

Examples of Useful Tools You Can Create

Suppose that you want to create a tool that opens the SAS Web page to the sample programs for Base SAS when the Enhanced Editor is the active window. You would perform the following steps:

  1. Make the Enhanced Editor the active window.

  2. In the Customize tab of the Customize Tools dialog box, click the Add tool toolbar button. This creates a template for a new tool in the list box.

  3. In the Command field, type http://support.sas.com/techsup/sample/ base_samples.html.

    • In the Help Text field, type Sample programs for Base SAS on sas.com .

      In the Tip Text field, type sas.com sample programs .

  4. Click the Change icon button. From the Bitmap Browser dialog box, select a bitmap that is appropriate for the sample programs on the SAS Web site and click OK .

  5. Use the Move tool up and the Move tool down buttons to position the tool in the toolbar.

  6. Click the Save the toolbar button to save the tool with your default tool configuration.

The following are some examples of other tools that you might find useful to create:

WEDIT; CLEAR; INCLUDE C:\SAS\MYPROGRAM.SAS

WEDIT; FILE C:\SAS\MYPROGRAM.SAS; CLEAR

WEDIT; CLEAR; INCLUDE C:\SAS\MYPROGRAM.SAS; SUBMIT

WEDIT; CLEAR; INCLUDE C:\SAS\SIGNON.SAS; SUBMIT

WEDIT; CLEAR; INCLUDE C:\SAS\DOWNLOAD.SAS; SUBMIT

TOOLLOAD BAR SASUSER.PROFILE.MORTOOLS

Категории