Why is the SAS toolset in ArcGIS Pro 2.8 Failing?

304
1
08-12-2021 08:42 AM
Labels (2)
RachelPasser1
New Contributor II

I have been testing the new SAS toolset in ArcGIS Pro 2.8, since my organization has many SAS programmers our GIS team collaborates with. It's within the Conversion Tools. I have been asked to test out these SAS conversion tools. While trying to run the SAS to Table & Table to SAS, every time they fail within 10 seconds at most. I have tried running them through the geoprocessing window as well as arcpy. On my PC, I have both base SAS 9.4 as well as SAS Enterprise Guide 8.1. I have been trying to import a sas table where the rows are ZCTAs in my state. There should not be any issues with the structure of the table, it's set up in a way that should be able to join to ZCTA GIS data.

SAS to Table Inputs
Input SAS Dataset (libref.tablename): work.ZCTA_WOCBA
Output Table: O:\_Projects\Misc Reference Map.gdb\SASToTable_ZCTA_WOCBA
Download SAS Dataset from SAS Cloud Analytic Services (CAS): LOCAL_SAS
CAS Hostname URL:
Port:
CAS Username:
Password:

Results (after 10 seconds)
Traceback (most recent call last):
File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\SAS2Table.py", line 101, in <module>
casUserName = casUserName, casPassword = casPassword)
File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\SAS2Table.py", line 64, in __init__
sas, scratchCFG = SAS_UTILS.getSASSessionInfo()
File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\SAS_Utilities.py", line 84, in getSASSessionInfo
sas = SASPY.SASsession(results='TEXT', cfgfile = scratchCFG)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\saspy\sasbase.py", line 537, in __init__
self.pyenc = sas_encoding_mapping[self.sascei]
KeyError: 'No SAS process attached. SAS process has terminated unexpectedly.'

--------------------------------------------------

Table to SAS Inputs
Input Table: ZCTA_wCensus2019
Output SAS Dataset (libref.tablename): work.ZCTA_wCensus2019_test
Replace SAS Dataset:
Use Domain and Subtype Descriptions:
Upload SAS Dataset to SAS Cloud Analytic Services (CAS): LOCAL_SAS
CAS Hostname URL:
Port:
CAS Username:
Password:

Results (after 2 seconds)
Traceback (most recent call last):
File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\Table2SAS.py", line 152, in <module>
casHost = casHost, casPort = casPort, casUserName = casUserName, casPassword = casPassword)
File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\Table2SAS.py", line 56, in __init__
sas, scratchCFG = SAS_UTILS.getSASSessionInfo()
File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\SAS_Utilities.py", line 84, in getSASSessionInfo
sas = SASPY.SASsession(results='TEXT', cfgfile = scratchCFG)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\saspy\sasbase.py", line 537, in __init__
self.pyenc = sas_encoding_mapping[self.sascei]
KeyError: 'No SAS process attached. SAS process has terminated unexpectedly.'

----------------------------------------------------------

The only demo of this tool I've seen is here: https://www.esri.com/arcgis-blog/products/arcgis-pro/analytics/introducing-the-sas-arcgis-bridge/ and there does not appear to be any additional steps taken that I've seen. What am I missing?

Tags (2)
1 Reply
AlbertoNieto1
Esri Contributor

Hi Rachel,

My name is Alberto Nieto, and I'm a product engineer in the spatial statistics team that worked on the tool. Thank you for posting the problem and apologies that the tools are not working properly in this case. 

The problems in the two tools are both in the section of the tool that attempts to establish a SAS session using the saspy python package. We are likely making some assumptions about the ability of the package to create a temporary configuration file in a scratch location, and depending on your installation of SAS, this may be running into problems that we did not catch during development. 

Would it be possible to schedule a brief call with you to ask you a few details about your SAS installation and to manually test if this temporary configuration file is properly being created by the tool in your case? The call would help us identify the source of the problem so that we can implement a fix as soon as possible. Once we identify a fix, I will post back in this thread for the community to see. 

If you agree, please reach out to me directly at anieto@esri.com and we can coordinate a call.

Thank you again for posting and helping us identify these problems. Looking forward to hearing from you.

Alberto Nieto

0 Kudos