Configuring SAS for Host Editor Support in UNIX Environments


Requirements for using a Host Editor

SAS supports the use of a host text editor with the Motif interface, so you can use an editor such as vi or EMACS with your SAS session. There is no host editor set as the default host editor, so you must specify one to use this feature. Host editor support requires the use of the motifxsassm client. (See "The SAS Session Manager (motifxsassm) in UNIX" on page 33 for more information.)

Invoking and using Your Host Editor

How to Open and Use the Host Editor

To use your host text editor with SAS, complete the following steps:

  1. Specify the command required to invoke your editor with the EDITCMD system option.

  2. Invoke the editor as needed with the HOSTEDIT command.

The HOSTEDIT command passes data from a SAS window to the host editor. When you save in the host editor, the data is copied back into the SAS window if the window is writable.

After you return to the SAS text editor window, you can issue the UNDO command to undo all of the changes that you made with your host editor. You must issue the UNDO command a second time to return to the state of the window before the HOSTEDIT command was issued. If you issue the HOSTEDIT command in a read-only window, you can save your editing changes to an external file, but the SAS text editor window remains unchanged.

See "EDITCMD System Option" on page 325 and "HOSTEDIT Command" on page 213 for more information.

Example 1: Invoking SAS to Use xedit with the HOSTEDIT Command

Some systems have an X-based editor installed that is called xedit. If you want to use xedit with the HOSTEDIT command, you can invoke SAS with the following command:

 sas -editcmd '/usr/local/bin/xedit' 

Example 2: Invoking SAS to Use vi

The vi editor is a terminal-based editor that requires a terminal window. The xterm client's -e option runs a program when the xterm client is invoked. To use the EDITCMD option to display an xterm client in conjunction with vi, invoke SAS as follows :

 sas -editcmd '/usr/bin/X11/xterm -e /usr/bin/vi' 

Troubleshooting the Transfer of Text Attributes

Text attributes, such as color and highlighting, are not transferred between a host editor window and a SAS text editor window. Issue the HEATTR ON command to display a dialog box that will warn you if you are editing text with highlighting and color attributes that will be removed by the host editor. This dialog box prompts you to continue or abort the HOSTEDIT command. Specify HEATTR OFF to suppress this dialog box.




SAS 9.1 Companion for UNIX Environments
SAS 9.1 Companion For Unix Enivronments
ISBN: 1590472101
EAN: 2147483647
Year: 2004
Pages: 185
Authors: SAS Institute

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net