Chapter Contents

Previous

Next
SAS Companion for the Microsoft Windows Environment

Customizing Your SAS Session

The SAS windowing environment can be customized in several ways using commands, dialog boxes, and SAS system options.


Selecting Fonts

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

Tools
[arrow]
Options
[arrow]
Fonts
The fonts available depend on what monospace fonts you have installed under Windows. For example, you might have the Courier font and System font available. When you select a font or point size, the Font Sample field displays a sample of the font you have selected.

When you install SAS, the Setup program automatically installs a TrueType font, named SAS Monospace, 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:
Beware of changing certain display characteristics on low-resolution displays. If you select large font sizes on some monitors, you may not be able to see all the text in your SAS windows at one time. In some windows, such as the SAS/ASSIST window where there are no scroll bars, large font sizes can cause some choices to be invisible. For these types of displays, large font sizes are not recommended. This same problem can occur if you change the Windows Appearance properties and select a window border thickness of a thick size. On low-resolution displays, you should not use thick window borders.  [cautionend]


Setting Session Preferences

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

To customize your SAS session, enter DLGPREF in the command bar or select

Tools
[arrow]
Options
[arrow]
Preferences...
The Preferences dialog box (shown in Preferences Dialog Box (showing the General tab)) contains different pages that separate the session settings into different categories. Click on the tabs for each page that are located along the top of the dialog box to navigate to the settings that you want to change, and then select the options that you want. When you are finished, click on [OK]. The settings that you select are saved from session to session in the SASUSER.PROFILE catalog by their respecitve pages except for the Results page. The entries in the SASUSER.PROFILE are GENWSAVE, VIEWWSAVE, EDITWSAVE, WEBWSAVE, and ADVWSAVE . The Results page settings are saved in the SAS registry so they are not moved to another machine when the SASUSER.PROFILE catalog is copied.

Preferences Dialog Box (showing the General tab)

[IMAGE]

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

General Preferences

The General preferences page lets you specify the general options that control how your SAS session works. The following are the General options:

Recently used file list
specifies whether SAS retains a list of the files that you have accessed. If this option is selected, you can specify in the Entries field up to 30 files that you want to retain. Show recently used file list on submenu specifies whether the files will be displayed from the Recent Files submenu that you access from the File menu. If Show recently used file list on submenu is not selected, the files are displayed in the File menu. Each time that you access a file from an editor window, the filename is added to the list.

Confirm exit
specifies whether you want the SAS System to prompt you for confirmation before you end your SAS session.

Save settings on exit
specifies whether SAS should automatically save your settings when you exit your SAS session.

Submit contents of file opened
specifies whether you want to submit the contents of all files that you open to the SAS System.

Mail current window as attachment
specifies whether the active window should be automatically included as an e-mail attachment when you initiate electronic mail from within SAS. If you select this option, then you can also specify whether the attachment should be formatted as plain text or as RTF (rich text format, which retains font and color information).


View Preferences

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

Window
specifies whether your SAS windows contain scroll bars and/or a command line. You can also enable or disable ScreenTips (the helpful hints that appear when you position your mouse pointer over window controls).

Show
specifies whether to show certain aspects of the SAS interface, including the following settings:

Docking View
specifies whether to display the docking area on the left side of the main SAS window.

Window Bar
specifies whether to display the window bar at the bottom of the main SAS window.

Status line
specifies which aspects of the status line, if any, you want to have visible in your session. Display message lines specifies whether to display the message area of the status line. Display current folder specifies whether to display the SAS current folder area. Display cursor position specifies whether to display the line and column position of the Enhanced Editor cursor.


Edit Preferences

The Edit preferences page controls options that affect the SAS Text Editor, including:

Overtype mode
specifies whether to insert text or overtype on existing text when you type text in a SAS application window. You can also toggle the overtype mode by pressing the Insert key on your keyboard.

Autosave every n minutes
specifies whether to automatically save the contents of the PROGRAM EDITOR, and how often to save it. The contents are saved to pgm.asv in the current active folder so that you can recover your work in the event that your SAS session ends without giving you a chance to save the contents of the editor.

Enable unmarking with navigation keys
enables unmarking of text using the up, down, left, and right navigation keys.

Use Enhanced Editor
specifies whether the Enhanced Editor is the primary editor.


Results Page

The Results page lets you configure how you would like to view your program output results. The Results page options include:

Listing
specifies to display program output in the Output window.

HTML
specifies to display program output in HTML format.

Style
allows you to choose the appearance of the program output. For more information, see the topic on customizing the styles used in HTML output in the SAS System Help.

Folder
specifies a folder to store HTML output files. You can either type a folder name or click on [Browse] to search for a folder. This setting is only available when the Use WORK folder setting is not selected.

Use WORK folder
specifies to store HTML output files in the WORK folder. The WORK folder is a temporary folder that is deleted when SAS closes.

Autonavigate during results generation
specifies whether to update the browser with the latest generated HTML output.

View results using
specifies a browser to view HTML program output. Internal browser is available if Microsoft Internet Explorer is installed. When Internal browser is selected, SAS displays HTML output using the Results Viewer.

If you select Preferred browser, your HTML output displays using the browser specified by the Preferred browser - Other text field of the Preferences dialog box Web page .

Note:   If you select Use default on the Preferences dialog box Web page, your output is displayed using the browser registered with Windows.  [cautionend]


Web Preferences

The Web preferences page lets you 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 toobar button that issues the command). For more information about the WBROWSE command, see WBROWSE. You can specify the following Web options:

Preferred browser
specifies the preferred web browser to use when accessing web information from within the SAS System. By default, the SAS System uses the browser that is installed on your system and registered with Windows as the default browser. To use a browser other than the default, select the Other radio button and either type a path to the web browser or click [Browse] to search for the path to the Web browser.

Start page
specifies the default web page to which to navigate when invoking the web browser within the SAS System. By default, the browser navigates to http://www.sas.com (the SAS Institute home page on the World Wide Web).


Advanced Preferences

The Advanced preferences page lets you specify a few of the more subtle options that can affect your SAS session, including scrolling policy and other miscellaneous behavior. The Advanced options include:

Scrolling Options
specifies the number of lines that the Log and Output windows scroll when information is written to them.

For the Output winodw, if Scroll lines is selected and the window is full, the window will scroll the number of lines specified in the spin box. The default value is 0 (meaning that no output is written to that window while statements are executing, providing the best performance). When you select Scroll page, the Output window will not display any lines until an entire page is written. When Scroll max is selected, no output will be written to the window until until the procedure is complete.

The default Scroll lines value for the Log window is 1. The advantage of keeping the scrolling setting of the Log window at 1 is that the SAS System uses the Log window to notify you of the status of the running program.

Scrolling can increase the length of time that the SAS System takes to run your program. The less scrolling that the Log and Output windows have to do, the faster your program will run.

You can also set these values by using the Editor Options window or the AUTOSCROLL command. For more information about the AUTOSCROLL command, see AUTOSCROLL and SAS System Help.

Other
These are miscellaneous options settings:

Hide cursor in non-input windows
specifies that the cursor will not appear in windows that do not require text input (such as some SAS/AF programs and SAS/ASSIST software).

Disable scroll bar focus
specifies that the scroll bar does not receive window focus when you click on it. This eliminates flashing problems that can occur in some SAS System applications.


Customizing Your Windowing Environment

You can use several commands to customize your SAS windowing environment. This section describes using some of these commands.

Customizing Windows Positions

In the default display configuration of an interactive session (shown in The Main SAS Window) the main SAS window displays the Explorer and Results windows as docked windows, and the Log, Program 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: Minimize (Restore) All Windows, Cascade, Tile Vertically, Tile Horizontally, and Resize. While the default display configuration is sufficient for efficient SAS System use, you may want to open a few more windows for easy access and rearrange the windows on your display. For instance, you may want the My Favorite Folders window open, but minimized, with the windows arranged in a mosaic pattern so you can see all of them at once. To accomplish this, open the My Favorite Folders by selecting

View
[arrow]
My Favorite Folders
After it is opened, click on the minimize button in the window title bar for the My Favorite Folders window and then select Tile Vertically from the Windows menu.

The resulting main SAS window is displayed in Customized SAS Session:

Customized SAS Session

[IMAGE]

In addition, you can undock windows so that all windows can be positioned where you would like. For more information on the docking view, see Using the Docking View.

For a list of SAS commands used to control the appearance of the main SAS window, see Windowing Environment Commands that Control the Main SAS Window .

Changing the Window Colors

Changing the color of window components is a shared responsibility of Windows and the SAS System. You change the color of most standard window parts by changing the Properties of the Windows desktop.

Several window element colors are controlled by the SAS System (such as the color of error message text in the Log). To change a window component that is controlled by the SAS System, either type SASCOLOR in the command bar or select

Tools
[arrow]
Options
[arrow]
Colors...
The SASCOLOR window lets you choose the colors to use for specific elements. For more information about the SASCOLOR window, see the SAS System Help for the window.


Customizing Your Windowing Environment with System Options

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

AWSDEF
specifies the location and dimensions of the main SAS window when the SAS System initializes.

AWSTITLE
specifies the text for the main SAS window title bar.

FONT
specifies a font name and point size to use as the default SAS session font.

ICON
minimizes the SAS window when the SAS System initializes.

REGISTER
enables you to add applications to the main SAS window Tools pull-down menu so you can execute them by clicking on their names.

SPLASHLOC and NOSPLASH
specifies the location of the logo screen (SPLASHLOC) to display at the start of a SAS session, or suppresses the logo screen (NOSPLASH).

USERICON
specifies user-defined icons to be incorporated into SAS/AF applications.

WEBUI
specifies to enable mouse-pointing to select an object and a single mouse-click to invoke the object's default action.

These system options can be specified in your SAS configuration file or in the SAS command when you start the SAS System from a DOS window. Some are also valid in an OPTIONS statement. For details on the syntax of these options and on where you can specify them, see SAS System Options under Windows.

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 the SAS System initializes. Suppose you want your SAS session always to occupy the upper-left quarter of your display. To accomplish this, specify the following AWSDEF option in your SAS configuration file:

-awsdef 0 0 50 50

For more information about the AWSDEF system option, see AWSDEF.

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"

Minimizing Your SAS Session

The ICON system option causes the SAS System 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 display.

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 on its name. The REGISTER system option takes as arguments a menu name and an operating system command or a path specification for an executable file. You can also specify a working folder. For more information about the REGISTER system option, see REGISTER.

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 on 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 on Excel, the file EXCEL.EXE is invoked.

Note:   The REGISTER system option is valid only as an invocation option (that is, in a SAS configuration file or in the SAS invocation command).  [cautionend]

Displaying a Custom Logo Screen during SAS System Invocation

To display your own logo when the SAS System 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 DLL.

  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, be sure to specify the resource number as well. The default resource number is 1.

    For example, suppose your logo screen is stored in C:\MYBMPS\SPLASH.BMP. You would specify the SPLASHLOC system option like this:

    -splashloc c:\mybmps\splash.bmp

    If your logo was stored in C:\MYDLLS\OPENING.DLL as resource 101, you would specify the SPLASHLOC system option like this:

    -splashloc c:\mydlls\opening.dll 101

    For more information about the SPLASHLOC system option, see SPLASHLOC.


Adding User-Defined Icons to the SAS System

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

-USERICON icon-resource-file number-of-icons

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, refer to the SAS System Help for SAS/AF software and SAS/EIS software.

Enabling Web Enhancements in the SAS System

If you have Microsoft Internet Explorer 4.0 (IE) or greater installed, the WEBUI system option enables some SAS System 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

The SAS System assigns several commonly used commands to the toolbar 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 or SAS/AF program. This section describes how to customize the toolbar settings.

You customize all toolbar settings using the Customize tools dialog box. To open the Customize tools dialog box, either enter TOOLEDIT in the command bar or select the

Tools
[arrow]
Customize...
You use the Toolbars page for general toolbar settings and the Customize page to define tools on the toolbar.

Setting General Toolbar Preferences

The Toolbars page has settings to control the behavior and appearance the toolbar. Tools options include:

General
specifies toolbar button appearance and help options. These options include:

Large icons
specifies whether to use the set of large buttons on the toolbar. This is especially useful for high-resolution displays.

Show ScreenTips on toolbars
specifies whether to display a short button description when you place the cursor over the toolbar button.

Toolbars
specifies whether or not to display the toolbar and command bar. These options include:

Application Toolbar
specifies whether to display the toolbar for the active application.

Command Bar
specifies to display the command bar and enable the options to use the command bar.
When Use AutoComplete is selected, SAS remembers previously entered commands and completes the command once you start typing the command.
Select Sort commands by most recently used to display commands in the command bar drop down list by the most recently entered command. If this setting is not selected, the drop-down list commands are ordered by the most frequently used.
In the Number of commands saved box, enter the number of commands to save to display in the command bar list box. Valid values range between zero and 50. The default is 15.

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

Customizing a Toolbar

The Customize page allows you to add, delete, and modify commands on the toolbar. Customize Page of the Customize Tools Dialog Box shows the Customize page of the Customize Tools dialog box.

Customize Page of the Customize Tools Dialog Box

[IMAGE]

You may recognize some buttons as standard Windows buttons, such as the OPEN and SAVE commands. The following list explains each of the buttons (commands) and fields:

Commands that act on the file containing the toolbar definition are a series of three buttons at the top of the page. From left to right:
the open button opens a toolbar file
the save button saves a toolbar file
the restore button restores a toolbar to the default settings

Title
displays the title text which appears in the title bar when the toolbar is undocked.

Commands to define a toolbar, a series of eight buttons from left to right:

Add a tool
adds a tool or a separator space to the toolbar. This tool has two parts. When you click on the left button a blank tool is added to the toolbar. When you click on the the right down arrow, you can select to add either a Blank tool or Separator. Windows that define an action set (for example, Explorer) will have a selection for Action.

Remove tool
deletes a highlighted tool in the list box from the toolbar.

Change button
opens the Bitmap Browser to select a new icon for a tool button.

Move tool up
moves a tool up one position in the list box.

Move tool down
moves a tool down one position in the list box.

Cut
deletes the currently selected button from the list box and places it in the clipboard.

Copy
places a copy of the selected button to the clipboard.

Paste
copies a button from the clipboard to the highlighted command in the list box.

Command
displays the command for the highlighted tool in the list box. You can then add or modify the command in the text box.

Help Text
displays the help text that appears in the message area of the status bar when the cursor is placed over the button in the toolbar. You can add or modify the help text in the text box.

Tip Text
displays the tip text that appears under the button when the cursor is placed over the button in the toolbar. You can add or modify the tip text in the text box.

Toolbar list box
lists the buttons, commands, help text and separators that are defined in the toolbar.

To close the dialog box, click on [OK].

To Add a Tool to the Toolbar

To add a tool to the toolbar, perform the following steps:

  1. Do one of the following:

  2. Click on the Bitmap Browser button. Select a button in the Bitmap Browser dialog box, shown in Bitmap Browser Dialog Box, and click on [OK].

  3. Enter text in the Help Text field that will appear in the message area of the status line when you select the tool from the toolbar.

  4. Enter text in the Tip Text field that will appear under the button when you place the cursor over the button.

  5. Position the tool in the listbox by clicking on Move Up and Move Down buttons.

  6. When you are finished, click on the Save button. In the Save Tools dialog box, enter the library, catalog, and toolbox name. Then click on [OK].

Bitmap Browser Dialog Box

[IMAGE]


Removing a Tool from the Toolbar

To remove a tool from the toolbar, select the tool in the list box that you want to remove and click on the Remove Tool button. When you are finished, save the toolbar by clicking on the Save button.

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

Use the following procedure to customize a toolbar for 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 on the Save button. The Save Tools dialog box appears (as shown in Save Tools Dialog Box).

  4. The SAS System completes the libref, catalog, and entry fields. Select the Save tools for window check box, where window is the active window, and then click on [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. The SAS System first looks for toolbox entries in SASUSER.PROFILE before searching the application catalog.

Save Tools Dialog Box

[IMAGE]

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 about the TOOLLOAD command, see TOOLLOAD.

Resetting the Tools to the Default Settings

Click on the Restore Defaults button. The SAS System asks you to confirm that you want to restore to the default tool settings. When you click on [Yes], the tools are reset to their original settings (the settings that were in place when the SAS System was installed).

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

Examples of Useful Tools You Can Create

Suppose you want to create a tool that opens the SAS online documentation on the CD-ROM (SAS OnlineDoc). You would perform the following steps:

  1. In the Customize page of the Customize Tools dialog box, click on the Add tool button. This creates a template for a new tool in the list box.

  2. In the Command field, type sas onlinedoc which is the command for invoking the SAS OnlineDoc product. For more information about Windows-specific SAS commands and their options, see SAS Commands under Windows. For information about portable SAS commands, refer to SAS System Help.

    In the Help Text field, type Open the SAS OnlineDoc. In the Tip Text field, type SAS OnlineDoc.

  3. Click on the Bitmap Browser button. From the Bitmap Browser dialog box, select a bitmap appropriate for the help action (such as a PC with text bitmap) and click on [OK].

  4. Use Move Up and Move Down buttons to move the tool to the location you want on the toolbar.

  5. Click on the Save 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:

PGM; CLEAR; INCLUDE C:\SAS\MYPROGRAM.SAS
includes a program that you use often into the Program Editor window for editing.

PGM; FILE C:\SAS\MYPROGRAM.SAS; CLEAR
saves a SAS program after you finish editing it and clears the Program Editor window.

PGM; CLEAR; INCLUDE C:\SAS\MYPROGRAM.SAS; SUBMIT
includes and submits a SAS program that you use often.

PGM; CLEAR; INCLUDE C:\SAS\SIGNON.SAS; SUBMIT
includes and submits a SAS program to sign on to a remote system. For example, to sign on to a remote MVS session, the SIGNON.SAS program might contain:
options comamid=ehllapi remote=mytso;
libname remtdata 'mylib.mydata.monthly';
signon;
For more information about signing on to remote sessions, see SAS/CONNECT User's Guide.

PGM; CLEAR; INCLUDE C:\SAS\DOWNLOAD.SAS; SUBMIT
includes and submits a SAS program to download a data set from a remote session. Assuming that you have already signed on to the remote session, DOWNLOAD.SAS might contain:
proc download data=remtdata.june;
   /* where libname 'remtdata' is */
   /* already defined             */
run;
For more information about signing on to remote sessions, see SAS/CONNECT User's Guide.

TOOLLOAD BAR SASUSER.PROFILE.MORTOOLS
loads a different toolbar (that you created) containing another collection of tools.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.