|SAS Companion for the Microsoft Windows Environment|
The SAS windowing environment can be customized in several ways using commands, dialog boxes, and SAS system options.
To choose a different font or point size for text in SAS windows, open the Fonts dialog box by selecting
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.
|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
Preferences Dialog Box (showing the General tab)
following sections describe each page of the Preferences
dialog box and how to use these settings to control your SAS session.
The General preferences page lets you specify the general options that control how your SAS session works. The following are the General options:
The View preferences page lets you specify the options that control the appearance of your SAS session. The View options include:
The Edit preferences page controls options that affect the SAS Text Editor, including:
The Results page lets you configure how you would like to view your program output results. The Results page options include:
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.
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:
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:
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.
|Customizing Your Windowing Environment|
You can use
several commands to customize your SAS windowing
environment. This section describes using some of these commands.
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||My Favorite Folders|
The resulting main SAS window is displayed in Customized SAS Session:
Customized SAS Session
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 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
|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:
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.
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,
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"
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.
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
To display your own logo when the SAS System starts:
For example, suppose your logo screen is stored in C:\MYBMPS\SPLASH.BMP. You would specify the SPLASHLOC system option like this:
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.
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.
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
The Toolbars page has settings to control the behavior and appearance the toolbar. Tools options include:
|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.
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
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:
|the open button opens a toolbar file|
|the save button saves a toolbar file|
|the restore button restores a toolbar to the default settings|
To close the dialog box, click on [OK].
To add a tool to the toolbar, perform the following steps:
Bitmap Browser Dialog Box
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.
Use the following procedure to customize a toolbar for use with a particular application or window:
Save tools for windowcheck box, where window is the active window, and then click on [OK].
When you select the
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
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.
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.
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:
sas onlinedocwhich 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
the SAS OnlineDoc. In the Tip Text field,
The following are some examples of other tools that you might find useful to create:
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.
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.
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.