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 by 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 that are available depend on which 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.

Note:   You cannot use Fonts to select SAS/GRAPH fonts.   [cautionend]

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.  [cautionend]


Setting Session Preferences

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

To set your preferences, type 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 [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. 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 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 a text editor window, the filename is added to the list. You can then reopen the file quickly by selecting the filename from the list.

Confirm exit of SAS
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 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 display the docking area on 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 the message area of the status line. Display current folder specifies whether to display the SAS current folder area.


Edit Preferences

The Edit 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.

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

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 if your SAS session ends before you save the contents of the editor window.


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:

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

Create HTML
specifies that the program output is to be displayed 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 online 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.

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.

View results as they are generated
specifies whether to update the browser with the latest generated HTML output.


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 Help menu item or toolbar button 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 the SAS System. 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 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 allows you to specify options that can affect your SAS session, including scrolling policy and other miscellaneous behavior. The advanced options include

Scrolling Options
For the Output window, if Scroll lines is selected and the window is full, the window will scroll the number of lines that are 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 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 is required, the faster your program will run.

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 how to use 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: Minimize (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.

Note:   For optimal color resoultion when running OS/2 in 256 colors, check the "Workplace shell palette aware" check box in the System Properties notebook 256 Colors tab. To open the System Properties notebook from the desktop, double-click on the following icons:

OS/2 System
[arrow]
System Setup
[arrow]
System
  [cautionend]

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 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 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 the SAS command when you start the SAS System from an OS/2 window. 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 quadrant 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 main 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 opened.

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).  [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 either save it as a bitmap (which has a .BMP file extension), or compile it as a 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 were 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 that are 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 about how to build a resource file, see the documentation for the OS/2 Software Development Kit.

You can incorporate icons into your SAS/AF and SAS/EIS applications by using a FRAME entry. For more information, see the SAS online Help for SAS/AF and SAS/EIS software.


Customizing the Toolbar

SAS assigns several commonly used commands to the toolbar buttons for your convenience. You might find that the commands that you use most often are different from those that are 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 type tooledit in the command bar or select

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 that control the behavior and appearance of 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 to display the toolbar and command bar. These options include

Application Toolbar
specifies whether to display the toolbar for the active application. When this option is enabled, you can select Display as box for the toolbar to display in a separate window. Otherwise, the toolbar is docked to the main SAS window.

Command Bar
specifies that the command bar is to be displayed and the options be enabled in order to use the command bar.
When Display as box is enabled, the command bar displays as a separate window.
When Use AutoComplete is enabled, 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 in the order of the most recently typed 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, type the number of commands to save to display in the command bar list box. Valid values range from 0 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 OS/2 commands, such as OPEN and SAVE. The following section explains each of the buttons (commands) and fields.

The three toolbar buttons that act on the file that contains the toolbar definition are, from left to right:

Title
displays the title text that 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. To add a tool or a separator, click on the button and select either Blank tool or Separator. Windows that already define an action set 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 on the clipboard.

Copy
places a copy of the selected button on 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 either 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 to 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 to 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].

Adding a Tool to the Toolbar

To add a tool to the toolbar, follow these steps:

  1. Do one of the following:

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

  3. Type 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. Type 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 list box by clicking on the Move Up and Move Down buttons.

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


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

Follow these steps 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 have finished customizing the toolbar, click on the Save button. The Save Tools dialog box appears.

  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.

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.

Resetting the Tools to the Default Settings

To reset the tools to the default settings, click on the Restore Defaults button. The SAS System asks you to confirm that you want to reset the tool settings. When you click on [Yes], the tools are reset to their original settings (the settings that are 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

To create a tool that opens the SAS online documentation (SAS OnlineDoc) follow these steps:

  1. In the Tool Editor 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 sasdoc onlinedoc, which invokes the SAS OnlineDoc product. For more information about SAS commands that are specific to OS/2 and their options, see SAS Commands under OS/2. For information about portable SAS commands, see the SAS online 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 that is appropriate for the Help action (such as PC with text bitmap) and click on [OK].

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

  5. Click on the Save button to save the tool with your default tool configuration.

The following are some other tools that you might find useful to create.

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

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 the folowing statements:
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 the following statements:
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) that contains another collection of tools.


Chapter Contents

Previous

Next

Top of Page

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