import win32com.client
username = "user"
password = "pswd"
iomhost = "hostname"
iomport = 8591
factory = win32com.client.Dispatch("SASObjectManager.ObjectFactoryMulti2")
serverDef = win32com.client.Dispatch("SASObjectManager.ServerDef")
serverDef.MachineDNSName = iomhost
serverDef.Port = iomport
serverDef.Protocol = 2
serverDef.ClassIdentifier = "440196d4-90f0-11d0-9f41-00a024bb830c"
print('Start Connection')
SASApp = factory.CreateObjectByServer("SASApp",True,serverDef,username,password)
print('Connection successful')
program = "options formchar='|----|+|---+=|-/\<>*';"
program += "ods listing;proc means data=sashelp.cars mean mode min max; run;"
SASApp.LanguageService.Submit(program)
_list = SASApp.LanguageService.FlushList(999999)
print(_list)
log = SASApp.LanguageService.FlushLog(999999)
print(log)
SASApp.Close() I have installed required packages and using Python 3.7. I have executed the above code in eclipse and it terminated with the below message. Output: Start Connection and terminated without 'Connection Successful' message. When executing the same code line by line in Python IDLE, after the code SASApp = factory.CreateObjectByServer("SASApp",True,serverDef,username,password) Python stopped working unexpectedly as shown in the screenshot. Could anyone please help me to find what will be actual issue. Thanks in advance..
... View more