User manual

Chapter 13: ESS for SAS 70
ess-sas-submit-command: "sas8"
End:
The command line is also made of ess-sas-submit-pre-command, ess-sas-submit-
post-command and ess-sas-submit-command-options (the last of which is also buffer-
local). Here are some examples for your ~/.emacs or ~/.xemacs/init.el file (you may
also use M-x customize-variable):
;’sh default
(setq ess-sas-submit-pre-command "nohup")
;’sh default
(setq ess-sas-submit-post-command "-rsasuser &")
;’sh example
(setq-default ess-sas-submit-command "/usr/local/sas/sas")
;’ms-dos default
(setq ess-sas-submit-pre-command "start")
;’ms-dos default
(setq ess-sas-submit-post-command "-rsasuser -icon")
;Windows example
(setq-default ess-sas-submit-command "c:/progra~1/sas/sas.exe")
;Windows example
(setq-default ess-sas-submit-command "c:\\progra~1\\sas\\sas.exe")
There is a built-in delay before a batch SAS job is submitted when using a UNIX-imitating
shell under Windows. This is necessary in many cases since the shell might not be ready
to receive a command. This delay is currently set high enough so as not to be a problem.
But, there may be cases when it needs to be set higher, or could be set much lower to speed
things up. You can over-ride the default in your ~/.emacs or ~/.xemacs/init.el file
by:
(setq ess-sleep-for 0.2)
For example, (setq ess-sas-global-unix-keys t) keys shown, (setq ess-sas-
global-pc-keys t) in parentheses; ESS[SAS] function keys are presented in the next
section. Open the file you want to work with C-x C-f foo.sas. foo.sas will be in
ESS[SAS] mode. Edit as appropriate, then save and submit the batch SAS job.
F3 (F8)
The job runs in the *shell* buffer while you continue to edit foo.sas’. If ess-sas-
submit-method is ’sh, then the message buffer will display the shell notification when the
job is complete. The ’sh setting also allows you to terminate the SAS batch job before it
is finished.
F8 (F3)
Terminating a SAS batch in the *shell* buffer.
kill PID
You may want to visit the .log (whether the job is still running or it is finished) and
check for error messages. The .log will be refreshed and you will be placed in it’s buffer.
You will be taken to the first error message, if any.
F5 (F6)
Goto the next error message, if any.