ESS and Different Versions of SAS

Rich Heiberger rmh at
Thu May 22 16:05:00 CEST 2003

There are three ways to run SAS with emacs on Unix computers.  All three
are essentially interactive, in the sense that you write one PROC or DATA
at a time and look at it before deciding what to do next.

a. What ESS calls interactive, M-x SAS
You write lines of SAS code in the buffer and send them
over with C-c C-r and get the responses back in the *SAS:1.lst*
buffer.  I designed this for a 1200 baud telephone connection.  It
still works as designed.  I haven't used it much from about 9600 baud
onward and certainly not when I have a local machine or a high enough
speed that X-windows makes sense, either locally or remotely.

Can you switch SAS versions in this mode?  Yes, you will need to
define inferior-SAS-program-name to be buffer local and have two
versions of a private copy of ess-sas-sh-command, one per version of
SAS.  Since I am not recommending this, I am not working out the
details of how to do this.

If you go this route, look at ess/doc/README.SAS as well as the *info*
files.  This mode works from any emacs running on either the local or
remote computer, Unix or Windows.  The SAS process must be running on
a Unix machine, either local or remote.

b. What ESS calls interactive.
Here you need to select a set of function keys, see the *info* section
   ESS[SAS]-Function keys for batch processing
and consider using the `submit-region' and `append-to-output' commands
to send and retrieve one PROC at a time.

Can you switch versions of SAS?  Yes, Rodney will tell you how.

c. What ESS calls editing SAS files.
You run the SAS windows manager on your machine.  This makes sense on
a local machine or a high-speed connection where X-Windows is
practical.  You edit the in emacs, then pick up a region
(an entire PROC...RUN; section) and drop it in the SAS edit window and
click the RUN button.

This gives the combination of emacs/ESS editing and the full interactive
power of SAS GPLOT and other capabilities.

I normally use either b or c.


More information about the ESS-help mailing list