BookmarkSubscribeRSS Feed
kharvel
Calcite | Level 5

Hello all,

 

After careful research & troubleshooting, I have followed all the steps required to establish a SASPY connection to ODA (Ondemand for Academics) and I am still having trouble connecting.  I have already installed the SAS IOM encryption jars (https://support.sas.com/downloads/package.htm?pid=2494) so that would eliminate the encryption as an issue.

 

Below is the sascfg_personal.py

SAS_config_names=['oda']
oda = {'java' : 'C:\\Users\\rsheth\\Java\\jdk-23.0.1\\bin\\java.exe',
#US Home Region 2
'iomhost' : ['odaws01-usw2-2.oda.sas.com','odaws02-usw2-2.oda.sas.com'],
'iomport' : 8591,
'authkey' : 'oda',
'encoding' : 'windows-1252'
}

And below are the python commands I used to start the SAS session to ODA:

import pandas as pd
import saspy
sas=saspy.SASsession()

Now, I get the following error message:

Using SAS Config named: oda
We failed in getConnection


SAS process has terminated unexpectedly. RC from wait was: 4294967290

---------------------------------------------------------------------------
SASIOConnectionTerminated                 Traceback (most recent call last)
Cell In[1], line 3
      1 import pandas as pd
      2 import saspy
----> 3 sas=saspy.SASsession()

File ~\AppData\Local\anaconda3\Lib\site-packages\saspy\sasbase.py:594, in SASsession.__init__(self, **kwargs)
    592         raise SASIONotSupportedError(self.sascfg.mode, alts=['IOM'])
    593 elif self.sascfg.mode == 'IOM':
--> 594     self._io = SASsessionIOM(sascfgname=self.sascfg.name, sb=self, **kwargs)
    595 elif self.sascfg.mode == 'COM':
    596     self._io = SASSessionCOM(sascfgname=self.sascfg.name, sb=self, **kwargs)

File ~\AppData\Local\anaconda3\Lib\site-packages\saspy\sasioiom.py:317, in SASsessionIOM.__init__(self, **kwargs)
    314 self._tomods1 = b"_tomods1"
    315 self.sascfg   = SASconfigIOM(self, **kwargs)
--> 317 self._startsas()
    318 self._sb.reconuri = None

File ~\AppData\Local\anaconda3\Lib\site-packages\saspy\sasioiom.py:582, in SASsessionIOM._startsas(self)
    580 if enc == '':
    581    self.sascfg.encoding = 'utf-8'
--> 582 ll = self.submit("options svgtitle='svgtitle'; options validvarname=any validmemname=extend pagesize=max nosyntaxcheck; ods graphics on;", "text")
    583 self.sascfg.encoding = enc
    585 if self.pid is None:

File ~\AppData\Local\anaconda3\Lib\site-packages\saspy\sasioiom.py:988, in SASsessionIOM.submit(self, code, results, prompt, **kwargs)
    986    #return dict(LOG=log.decode(errors='replace'), LST='')
    987    logger.fatal(log.decode(errors='replace'))
--> 988    raise SASIOConnectionTerminated(Exception)
    989 except subprocess.TimeoutExpired:
    990    pass

SASIOConnectionTerminated: No SAS process attached. SAS process has terminated unexpectedly.
<class 'Exception'>

I would appreciate your assistance in troubleshooting and fixing the issue so that I can submit SAS code through python.  Thank you!

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 0 replies
  • 1600 views
  • 0 likes
  • 1 in conversation