We recently upgraded to SAS 9.2 on a Unix server that is maintained offsite, and previously we were on a Windows SAS 9.13 installation. Code that I used in Windows to run a few PROC SQLs, spin the data, generate some graphs, and then output everything to multiple HTML files worked fine. It actually works great in Enterprise Guide connected to our new Unix server as well.
However, when I attempt to SSH into our Unix server (which works) and run SAS from the command line with a command like the following (I'm using the -stdio option just to get more verbose error messages - same problem persists without the -stdio option):
> sas -stdio mainCode.sas
I get the following error when the 'mainCode.sas' script attempts to perform an "ods html close;" statement:
Fatal I/O error with the network connection to the X display server.
Connection to display localhost:11.0 was lost.
Traceback
vacrash+0x1c8
vacrash+0x38 -- bridge stub
FatalShutdown_8_1+0x160
wutxioe+0xc
_XIOError+0x3c
_XRead@AF58_34+0x200
XOpenDisplay+0x1414
wuwixtk(0x4f52000000000000, 0x9000000, 0x900000009b45104)+0x238
wutinit+0x270
wuxinit+0x160
wuxinit+0x38 -- bridge stub
yustrt+0x26c
14 The SAS System
yuinit+0x32c
yuropen+0x194
xuropen+0x38 -- bridge stub
fmxuini+0x6c
dpdinit+0x5b0
dpdinit+0x38 -- bridge stub
fminit+0x78
saszaf+0x1e0
vvtentr+0xf0
ERROR: Named item not found in list.
Arguments passed to GETNITEML:
1 APPLLIST = 4
2 APPLNAME = 'T2'
Program returning prematurely at line 198
AF Program: SASHELP.FSP.AFCLASS.SCL
*** Line 159: [ERROR: #114] Calling function SEND. Unable to perform requested function
Arguments passed to SEND:
1 _self_ = 4913
2 (Character Literal) = 'CLOSEPORT'
Parameters passed to SEND ENTRY:
1 mgrid = 2
2 rc = 0
Program returning prematurely at line 159
AF Program: SASHELP.FSP.COMM.SCL
(emphasis on the "Fatal I/O Error..." is mine)
The funny thing is, when I open an Xming window on my Windows machine (Xming is the interface we use to give us access to the X Windows environment on the Unix box), the same script will run without error, presumably because the Unix machine sees that I have an X Windows session connected via my Xming session.
So my question is this: Is there a way to fix this error without being required to have Enterprise Guide or an XMing session open to run the code that is using the ODS HTML statements? I need to be able to get this code automated to run on a daily basis without my involvement, so doing away with the windowing is a necessity so that I can run this in batch directly on the server. Any ideas what's going on? Is this a user setup problem that I could have our admin fix?