[ESS] not starting interactive SAS session reliably

Stephen Conklin conklin at step2hen.org
Fri Apr 7 20:33:44 CEST 2006



i am using 

xemacs [version 21.4; April 2001] 
ess-5.2.12
on AIX
$ uname -a
AIX sassrv1 2 5 002204CB4C00


i am having a problem starting an interactive  SAS session reliably. sometimes it works, sometimes it fails. 
these are the steps i follow.

open a sas file

C-x C-f bar.sas


M-x SAS

after a time delaly (4 sec) i get 4 windows

------------------- 1 --------------------------------------
-----XEmacs: bar.sas (ESS[SAS] Font [none])
 contains sas code
---------------------------------------------------------

--------------------- 2 ------------------------------------
--**--XEmacs: *SAS.log*    (Shell ESStr [])
  contains
   sconklin at sassrv1:/afs/btv.ibm.com/u/sconklin/sasuser.800/MySasProgrmas/conk
   $ tty
   /dev/pts/56
   
   sconklin at sassrv1:/afs/btv.ibm.com/u/sconklin/sasuser.800/MySasProgrmas/conk
   $ 
---------------------------------------------------------


---------------------- 3 -----------------------------------
--**--XEmacs: *SAS.log*    (Shell ESStr [])
 contains
   sconklin at sassrv1:/afs/btv.ibm.com/u/sconklin/sasuser.800/MySasProgrmas/conk
   $ tty
   /dev/pts/56
   
   sconklin at sassrv1:/afs/btv.ibm.com/u/sconklin/sasuser.800/MySasProgrmas/conk
   $ 
---------------------------------------------------------

------------------------ 4 ---------------------------------
--%*-XEmacs: *SAS.lst*     (Shell ESSlst [])
 contians
    sconklin at sassrv1:/afs/btv.ibm.com/u/sconklin/sasuser.800/MySasProgrmas/conk
    $ tty
    /dev/pts/55
    
    sconklin at sassrv1:/afs/btv.ibm.com/u/sconklin/sasuser.800/MySasProgrmas/conk
    $ 
---------------------------------------------------------


at this point the command buffer at the bottom has 
/sasuser.800/MySasProgrmas/conk/
waiting for me to press return

when i press return i have the problem. it looks like the script ess-sas-sh-command is called. there are two parameters $1 and $2  passed in 
stdout=$1
stderr=$2

$1 should be = to /dev/pts/56 and $2 should be = to /dev/pts/55 and that is what i get about 10 % of the time.
 
most of the time i get
$1=sconklin at sassrv1:/afs/btv.ibm.com/u/sconklin/sasuser.800/MySasProgrmas/conk
$2=sconklin at sassrv1:/afs/btv.ibm.com/u/sconklin/sasuser.800/MySasProgrmas/conk

or i get

$1=/dev/pts/<some value>
$2=sconklin at sassrv1:/afs/btv.ibm.com/u/sconklin/sasuser.800/MySasProgrmas/conk

or i get

$1=sconklin at sassrv1:/afs/btv.ibm.com/u/sconklin/sasuser.800/MySasProgrmas/conk
$2=/dev/pts/<some value>

when i get

$1=/dev/pts/<some value>
$2=/dev/pts/<some value>

everything works great.  

i can also hard code the ess-sas-sh-command script with the 
$ tty
/dev/pts/56 and  /dev/pts/55  or what ever tty's are called out
that show up in the first windows that are cerated. if i do this before i press return the second time everything works.


my problem is i am not passing the tty info to the ess-sas-sh-command script reliably.

at this point i am not lisp savvy enough to figure out this feature. 

any help would be greatly appreciate


Stephen




More information about the ESS-help mailing list