Chapter Contents |
Previous |
Next |
SAS Companion for UNIX Environments |
The SAS System functions correctly without any modifications to the resource database. However, you may want to change the default behavior or appearance of the interface. There are several ways to specify your customizations. Some methods modify all SAS sessions displayed on a particular X server. Some methods affect all SAS sessions run on a particular host. Other methods affect only a single SAS session.
The following sections describe how to customize the resource database. If you need more information on X Window System clients and X resources, refer to the documentation provided by your vendor.
Specifying X Resources |
A resource specification has the following format:
resource-string: value |
SAS
), the separator is a period
(.) or asterisk (*) character, and the second identifer is the name of the
specific resource. The value given may be a Boolean value (
True
or
False
), a number, or a character string, depending
on the resource type.
The application name and resource name can both specify an instance value or a class value. A specification for a class applies to a larger scope than a single instance.
The following are sample resource specifications:
SAS.startSessionManager: True SAS.maxWindowHeight: 100 SAS.awsResizePolicy: grow
Refer to your X Window System documentation for more information on resource specifications.
Customizing SAS Resources |
The following list describes the methods that you can use to customize X resources.
sas -xrm 'SAS.confirmSASExit: False'
You can specify the -xrm option as many times as needed. You must specify the -xrm option for each resource.
Note: If you normally invoke the SAS System with a shell script, you should protect the quote characters from the shell with the backslash (\) character:
sasscript -xrm \'SAS.confirmSASExit: False\'
You can also add resources to the resource database
after SAS has initialized by running xrdb. For example, the following command
merges the definitions in the
myresources
file into the resource database:
xrdb -merge myresources
app-defaults
.) Set the environment variable XAPPLRESDIR to the pathname
of this subdirectory. Specify the definition for the XAPPLRESDIR environment
variable in the initialization file for your shell, for example, the
$HOME/.login
,
$HOME/.cshrc
or
$HOME/.profile
files, to ensure that the XAPPLRESDIR variable is defined for each
shell that is started.
Create a file called
SAS
in the subdirectory
identified by XAPPLRESDIR. Include your resource definitions in this file.
SAS
to contain your resource definitions, and store this file in the
system
app-defaults
directory.
For more information on X resources, refer to the X Window System documentation supplied by your vendor or to other books on the X Window System.
Setting X Resources through the Preferences Dialog Box |
Tools | Options | Preferences |
Preferences Dialog Box
Start Session manager
SAS.startSessionManager
resource.Startup Logo
If you select
Use Default Logo
, SAS uses the default file for your site. If you select
No Logo
, then no file is displayed.
If you select
Use Custom Logo
, then you can either enter the XPM filename directly in the text field
or press [Select] to open the File Selection dialog box. This
check box sets the
SAS.startupLogo
resource.
Use application workspace
SAS.noAWS
resource. You must exit and reopen the windows for changes to this
resource to take effect.AWS Resize Policy
Grow
Fixed
This check box sets the
SAS.awsResizePolicy
resource.
Use menu access keys
SAS.usePmenuMnemonics
resource.Confirm exit
SAS.confirmSASExit
resource.Save settings on
exit
SAS.wsaveAllExit
resource. Use host printing
SAS.hasXPrinter
resource.Backup Documents
SAS.autoSaveInterval
resource) the documents
that you currently have open. This check box sets the
SAS.autoSaveOn
resource. Help & Documentation
Browser - Netscape Path
SAS.helpBrowser
resource.Default
paste buffer
XPRIMARY
PRIMARY
)XSCNDARY
SECONDARY
)XCLIPBRD
CLIPBOARD
)XTERM
XCUTn
This check box sets the
SAS.defaultPasteBuffer
resource. See Controlling Pull-down Menus
for more information about cut-and-paste butters.
Automatically store selection
SAS.markPasteBuffer
resource.Cursor
Insert
and
Overtype
check boxes set
the
SAS.insertModeOn
resource
to
True
and
False
, respectively.The items on the Results tab affect only output that is produced through the Output Delivery System (ODS). For a complete description of ODS, refer to The Complete Guide to the SAS Output Delivery System.
Create Listing
SAS.resultsListing
resource.Create HTML
SAS.resultsHTML
resource.Folder
SAS.resultsTmpDir
resource.Use WORK Folder
SAS.resultsUseWork
resource.Style
Solutions | Accessories | Registry Editor |
SAS.resultsHTMLStyle
resource.View results as they are
generated
Password protect HTML file browsing
is deselected.
This check box sets the
SAS.resultsAutoNavigate
resource.Password protect HTML file
browsing
View results as they are generated
is deselected. This check box sets the
SAS.htmlUsePassword
resource.Display tools window
SAS.defaultToolBox
resource.Display command window
SAS.defaultCommandWindow
resource.Auto Complete Commands
Save Commands
are selected, then SAS can automatically fill in commands that were
entered in previous sessions. This check box sets the
SAS.autoComplete
resource. Save Commands
commands.hist
in your SASUSER directory. If this
check box is selected, then SAS will be able to automatically fill in (see
Auto Complete Commands
) commands
that were entered in previous sessions. This field sets the
SAS.commandsSaved
resource.Combine windows
SAS.useCommandToolBoxCombo
resource.Use arrow decorations
SAS.useShowHideDecorations
resource.Always on top
SAS.toolBoxAlwaysOnTop
resource.Toolbox
Persistent
SAS.isToolBoxPersistent
resource.The items in the Tools area affect the individual tools in the toolbox.
Use large tools
SAS.useLargeToolBox
resource.Use tip text
SAS.useToolBoxTips
resource.delay
SAS.toolBoxTipDelay
resource. You can enter a value directly into the field or use the
arrows to the right of the field to change the value.Setting X Resources with the Resource Helper |
With Resource Helper, you can customize the key definitions and colors of SAS's interactive interface. Resource Helper creates SAS resource definitions and stores them in a location where the Resource Manager can find them. See How Resource Helper Searches For X Resources for a list of the locations that Resource Helper searches for resource definitions. Resource settings that are saved with Resource Helper will take effect the next time you start a SAS session.
You can start Resource Helper from within a SAS session
or from your shell prompt.
Start the SAS Resource Helper from a SAS window by entering
reshelperon the command line.
Main Window for Resource Helper
Resource Helper is installed into the
/utilities/bin
subdirectory in the directory where SAS is installed (
!SASROOT
). The name of the executable module is
reshelper
. For example, if the SAS System is installed in
/usr/local/sas8
, you start Resource Helper by typing
the following command:
/usr/local/sas8/utilities/bin/reshelper &
If you run Resource Helper from a shell script, you
might need to set the XKEYSYMDB and XLOCALEDIR environment variables in order
for Resource Helper to work. XKEYSYMDB should contain the path to
/X11/resource_files/XKeysymDB
in the
!SASROOT
directory, and XLOCALEDIR should contain
the path to
/X11/resource_files/locale/
in that same directory. If SAS is installed in
/usr/local/sas8
, then in the Bourne or Korn shells,
you can assign these environment variables as follows:
export XKEYSYMDB=\ /usr/local/sas8/X11/resource_files/XKeysymDB export XLOCALEDIR=\ /usr/local/sas8/X11/resource_files/locale/In the C shell, you can enter
setenv XKEYSYMDB \ /usr/local/sas8/X11/resource_files/XKeysymDB setenv XLOCALEDIR \ /usr/local/sas8/X11/resource_files/locale/
Resource Helper accepts the standard X Toolkit options.
Refer to the documentation provided by your X Window System vendor for a
list of these options.
Note:
In most cases, using Resource Helper is much easier and faster
than defining the resources yourself. However, the X Window System searches
for resources in several places, so it is possible for Resource Helper to
pick up the wrong key symbol for the key you are trying to define. If you
get unexpected results while using Resource Helper, you might need to define
your key resources yourself. See Defining Key Translations
for more information.
Start the Resource Helper (see Setting X Resources with the Resource Helper) and select the Keys icon.
Keys Window for Resource Helper
Key definitions are
divided into several
Action Categories
:
Move By Cursor
Move By Field
Edit
Miscellaneous
All Actions
To define a key, follow these steps:
F12
. If a default SAS translation
has already been assigned to the key combination, Resource Helper displays
the default translation.
Edit
as your
Action Category
. Resource Helper will
display a list of actions in that category.
delete current field
. Resource Helper can assign only one action to
a translation. If the action that you select requires an argument (such as
sas-action-routine
), Resource Helper prompts you for the argument.
Resource Helper displays the key combination and its new definition:
None<Key>F12: sas-delete()
Note: If you select the sas-function-key action routine,
then the key definition is automatically displayed in the KEYS window. If
you choose another action routine and if you want the definition to appear
in the KEYS window, you will need to define a window label for the key. See Modifying the keysWindowLabels Resource for information
on defining labels in the KEYS window.
User-Defined Keys
.
File | Save Resources |
To modify a key
definition that is already in the
User-Defined Keys
list, select the definition, select the left arrow
to remove the definition from the list, and edit the definition.
To delete a definition from
User-Defined Keys
, select
it and select
Delete
.
[Clear] clears the key definition edit window.
[Default Defined Keys...] displays the
default key definitions for your system.
Start Resource Helper and select the Colors icon.
Colors Window for Resource Helper
You can modify the color of part of a SAS window as follows:
Category
window.
Customize Colors Window for Resource Helper
You can customize a color by
Alias
Red, Blue,
or
Green
sliders
The result is displayed in the
Sample Window
. The hex value of the color is displayed at the bottom of the window.
For example, double-click on
Red
in the
Colors
window.
Change Red from:
displays the
Red
currently used by SAS windowing environment. Click on
Aquamarine
under
Aliases
and observe the change in the
To:
display. Move the
Red
,
Green
, and
Blue
sliders with your mouse button and note the changes in the color of the
To:
display. Click on
Apply
and note the difference
in the color displayed as
Red
in the
Colors
window. Select [OK] to save your changes.
You can also change the attributes of some categories
of SAS windows.
Attributes
allows you to select
Highlight
,
Underline
, or
Reverse
.
Select [Defaults] to restore your color settings to their default values. Select [OK] to exit the Colors window after you have finished defining your color settings. To save your color settings permanently, from the Resource Helper pull-down menus, select
File | Save Resources |
~/.Xdefaults-
hostname file, where hostname
is the name of the machine on which Resource Helper is running.
To determine if any resources have been defined in your RESOURCE_MANAGER property, issue the following command:
xrdb -q | moreIf no listing is returned, the RESOURCE_MANAGER property does not exist. In this case, Resource Helper loads the resources defined in the
~/.Xdefaults
file.
You can use
%N
to substitute an application
class name for a file when specifying the XUSERFILESEARCHPATH environment
variable. For example, to point to
/usr/local/resources
as
the location of all the resources for any application, issue the following
command in the Bourne or Korn shells:
export XUSERFILESEARCHPATH=\ /usr/local/resources/%N
In the C shell, the command is
setenv XUSERFILESEARCHPATH \ /usr/local/resources/%N
As a result, when SAS is invoked, the file pointed to by XUSERFILESEARCHPATH is
/usr/local/resources/SAS
SAS
is the application class name for SAS.
export XAPPLRESDIR=/usr/local/app-defaultsat the next invocation of SAS, the application's class name is appended to the path:
/usr/local/app-defaults/SAS
In the C shell, the command is
setenv XAPPLRESDIR /usr/local/app-defaults
~/SAS
.
Note: To determine if an environment variable has been set, you can issue the following command:
env|grep <environment_variable>
/usr/lib/X11/app-defaults
. Resource Helper does not need to have write
access to this file, but it must be able to read the file and add the SAS
resources to a writable resource file. Resource Helper does not generate
a warning message if the file is not present or if it cannot read the file.
Except for the
/usr/lib/X11/app-defaults
file, Resource Helper trys to write the new
resources to the same directory and file where it first found SAS resources.
This location must be a writable file in a writable directory. If Resource
Helper cannot write to the file, the SAS resources in that file will remain
in effect and any new or modified resources generated by Resource Helper will
not take effect. If this happens, Resource Helper displays an error dialog
box that contains the file or directory and suggests a way to fix the problem.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.