[ESS] not starting interactive SAS session reliably
Rodney Sparapani
rsparapa at mcw.edu
Fri Apr 7 22:29:25 CEST 2006
Stephen Conklin wrote:
>
> 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
Hi Stephen:
The reason that you see two *SAS.log* buffers is that ESS is waiting for
SAS to initialize.
Once that's done, the upper *SAS.log* buffer becomes *SAS* and
has a transcript of all the lines that were sent to SAS. But, what is
it waiting for?
For me, M-x SAS only works once. So, if I kill my *SAS*
buffer (and therefore, it's associated process), another M-x SAS
will not work. Is that what you are seeing? If not, try
running M-x ess-sas-interactive. This is more a test to see if
all of the internal stuff is working. If that works, then it's
probably something else....
Rodney
More information about the ESS-help
mailing list