BookmarkSubscribeRSS Feed
Calcite | Level 5


We are using SAS(9.4) in remote linux server and we need to connect the SAS app to the databricks. I've installed saspy in the cluster.

the config setting is here

config = '''
loyalty = {'java' : '/usr/bin/java',
'iomhost' : 'lnzlwl*****',
'iomport' : 18**2,
'authkey' : 'l****ty',
'encoding' : 'latin1'

I got this error:

The application could not log on to the server "lnzl**********2". The machine name is not valid.

I am sure about the host and port since I copied from SAS app

Screenshot 2023-09-08 at 4.36.18 PM.png

Please advise



What SAS/ACCESS product are you using to connect to Databricks? SAS/ACCESS to Databricks / ODBC / JDBC? Have you configured the ACCESS product to work with Databricks?

Calcite | Level 5

I am using saspy package to do this connection and do this setting, set the config as above and then run this command:

sas = saspy.SASsession()

got this error:

Using SAS Config named: loyalty
We failed in getConnection
The application could not log on to the server "lnzlwlgs****". The machine name is not valid.

SAS process has terminated unexpectedly. Pid State= (1780, 64000)
SAS Connection failed. No connection established. Double check your settings in file.
Tourmaline | Level 20

The only trouble shooting advice I can give is try to ping the server from the instance this configuration file is being used.

Other than that, try SAS tech support.


It feels like a SAS/ACCESS to ODBC would be easier to setup. But maybe you prefer working with notebooks, even if it's SAS code (or I may misunderstood how this is working)?

Data never sleeps
Calcite | Level 5

Yes, we need to connect to SAS by notebook.
I've tried to change my configuration and used IP address of server, the type of error is changed, before it said the machine name is incorrect now it said the port is incorrect, could you help me to find how I can find SAS is using which port?


config = '''
loyalty = {'java' : '/usr/bin/java',
'autoexec'  : 'options filesystem=hfs;',
'iomhost'   : '192.168.**.176',
'iomport'   : 8591,
'authkey'   : 'loyalty',
'appserver' : 'lnzlwlgs****'

AFAIK, SASPy provides an interface between Python and SAS. When you run Python code in SASPy it is converted into SAS code that runs in your SAS installation. I don't see how this could possibly work with Databricks unless you had a SAS product (like SAS/ACCESS) able to do this, unless I'm completely misunderstanding what's possible.

SAS Employee
hosts and ports are defined in metadata. You can see what they are using SMC, or via proc iomoperate:
SAS Employee

Did you figure out your host and port? Also, you had the `appserver` key in your posted config, with an invalid value. It's not clear you need that, but specifying it with an invalid value will cause a problem. Not seeing the actual errors or output from what you're trying doesn't help. Can you show the code you're submitting and all of the output? Do you still need help with this? Or did you get it working?




Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.


Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 


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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 4 in conversation