Chapter Contents

Previous

Next
SAS Companion for the OS/2 Environment

Customizing Your SAS Session

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.


Selecting Fonts

To choose a different font or point size for text in SAS windows, select

Tools
[arrow]
Options
[arrow]
Fonts
The Font dialog box will be displayed. The fonts that are available depend on what monospace fonts you have installed under OS/2. For example, you might have the Courier font available. When you select a font or point size, the Font Sample field displays a sample of the font that you have selected.

You cannot use Fonts 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 OS/2 Appearance properties and select a thick window border. On low-resolution displays, you should not use thick window borders.  [cautend]


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, select Options, and Preferences from the Tools pull-down menu. 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 [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)

[IMAGE]

The following sections describe each page (or tab) 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. These 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 a text editor window, the filename is added to the list. You can then reopen the file quickly by selecting its name from the list.

Confirm exit of SAS
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 Open from the File pull-down menu.

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 allows you to specify the options that control the appearance of your SAS session. The view options include the following:

Window
specifies whether your SAS windows contain scroll bars and a command line. You can also enable or disable a ScreenTip (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 these options:

Docking View
specifies whether to dock certain windows to the left side of the main SAS window.

Status line
specifies which aspects of the status line 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.


Edit Preferences

The Edit Preferences page controls options that affect the SAS text editor include the following:

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 before you save the contents of the editor.


Results Preferences

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

Listing
specifies that the program output is to be displayed in the Output window.

HTML
specifies that the program output is to be displayed 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 the SAS session ends.


Web Preferences

The Web Preferences page allows you to specify the preferred Web browser for your SAS session. These preferences are used whenever you issue the WBROWSE command (either directly or by selecting a menu item or tool icon that issues the command). For more information about WBROWSE, see WBROWSE. The Web options that you can specify are

Preferred browser
specifies the preferred Web browser to use when accessing Web information from within SAS. Type a path to the Web browser or click on [Browse] to search for the path to the Web browser.

Start page
specifies the default Web page to which to navigate when you invoke the Web browser within SAS. By default, the browser navigates to http://www.sas.com (the SAS Web site).


Advanced Preferences

The Advanced Preferences page allows you to specify 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 in order to provide 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 (described in the SAS online Help).

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.


Customizing Your Windowing Environment

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

Customizing Window 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 Window menu, you can position SAS windows in the same manner as other OS/2 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 example, 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, you click on the minimize button in the window title bar for the My Favorite Folders window and then select Tile from the Window menu.

For more information about SAS commands that have OS/2 dependencies, see SAS Commands under OS/2.

Changing the Window Colors

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

Several window element colors are controlled by the SAS System (such as the color of error message text in the Log window). 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 allows you to choose the colors for specific elements. For more information about the SASCOLOR window, see the SAS online Help for the window.


Customizing Your SAS Session with System Options

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 SAS Tools menu so that 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 options can be specified in your SAS configuration file or in a SAS command. 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 OS/2.

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 system 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 option. 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 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 menu of the SAS window. You can execute one of these applications by clicking on its name. The REGISTER 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. For complete information about the REGISTER system option, see REGISTER .

Here is an example that adds a command to print the contents of the SASUSER folder:


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

When you select Contents of SASUSER from the Tools menu, the output from issuing the OS/2 DIR command is displayed in an OS/2 window.

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


-register "Notes" "notes.exe" "c:\notedata"

This adds Notes to the menu. When you select Notes, the file NOTES.EXE is invoked.

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

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 either save it as a bitmap (which has a .BMP file extension), or compile it as resource and build it into a dynamic link library (DLL).

  2. When you invoke SAS, specify the SPLASHLOC option with the full pathname of the file that contains your bitmap. If the bitmap is in a DLL, 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 specify the SPLASHLOC 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 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 option enables you to add your own icons to the SAS System. These icons can be used in SAS/AF and SAS/EIS software. The syntax for the USERICON 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 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 OS/2 Software Development Kit (and must therefore be 32-bit). For more information on how to build a resource file, refer to the documentation for the OS/2 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 online Help for SAS/AF and SAS/EIS software.


Chapter Contents

Previous

Next

Top of Page

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