| SAS Companion for the Microsoft Windows Environment |
This section gives you information about how you can customize your SAS session to how
you like to work. The SAS windowing environment can be customized in several ways: from the Options pull-down menu, from the Preferences dialog box, and by using SAS system
options.
To choose a different font or point size for text in SAS windows, select the Tools pull-down menu and then select
Options and Fonts..., which displays the Font dialog box. 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.
![[cautend]](../common/images/cautend.gif)
You can configure your SAS session to
accommodate the way that you like to work. For example:
To
customize your SAS session, select the Tools pull-down menu, and then select Options, and 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
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
options that you select are saved from session to session in the PREFWSAV.WSAVE entry in your SASUSER.PROFILE catalog.
Preferences Dialog Box (showing the General tab)
The
following sections describe each page (or tab) 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:
-
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 how many filenames you want to keep in the list
in the SAS File menu. Each time that you access a file from an editor window, the filename is added to the list. You can then reopen the file quickly by selecting its name from the list in the File
menu.
-
Confirm exit
-
specifies whether you want the SAS System to prompt you for a 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 for processing when you select the File
pull-down menu and then select Open.
-
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).
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
options:
-
Docking View
-
specifies whether to dock certain windows to 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 help messages from ScreenTips and ToolsTips. Display current folder specifies whether to display the path name of the current SAS working
folder.
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.
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.
-
Folder
-
specifies a folder to store HTML program output files. You can either type a folder name or click on [Browse] to search for a
folder.
-
Use WORK folder
-
specifies to store HTML program 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 program output within a SAS window.
Select Preferred browser to view
HTML program output using the browser entered in the Web page Preferred browser - Other text field.
Note:
If you select Use default on the Web page, your program output is displayed using Internet Explorer outside of the
main SAS window. ![[cautend]](../common/images/cautend.gif)
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 menu item or tool 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 SAS. 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 SAS. By default, the browser navigates to http://www.sas.com (the SAS
Institute home page on the World Wide Web).
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 example, a value of 10 scroll lines for the Output
window causes the Output window to scroll only after your program creates 10 lines of output. The default value for the Log window is 1; the default value for the Output window is 0 (meaning that no
output is written to that window while statements are executing, providing the best performance).
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. 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.
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 online
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
applications.
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: Restore All Windows, Cascade, Tile, 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 Favorites window
open, but minimized, with the windows arranged in a mosaic pattern so you can see all of them at once. To accomplish this, you click on the minimize button in the window title bar for the My Favorites
window and then select Tile from the Windows menu.
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 more information about SAS commands that have aspects specific to Windows, see
SAS Commands under Windows .
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]](../common/images/arrow.gif) |
Options |
![[arrow]](../common/images/arrow.gif) |
Colors... |
The SASCOLOR window lets you
choose the colors to use for specific elements. For more information about the SASCOLOR window, see the SAS online Help for
the window.
Several SAS system options are available to control the 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.
These system options can be specified in your SAS configuration file or in the SAS command. 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, see AWSDEF.
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
command). ![[cautend]](../common/images/cautend.gif)
To display your own logo when the SAS System starts:
-
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 resource and build it into
a DLL.
-
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.
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 online Help for SAS/AF software and SAS/EIS software.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.