ArcGIS Blog

Analytics

ArcGIS Pro

SAS®-ArcGIS Bridge: Why Can't I Find My SAS Data?

By Kevin Butler

The SAS®-ArcGIS Bridge is a suite of geoprocessing tools and Python libraries that allow you to transfer data between ArcGIS and SAS, bring SAS analytics into ArcGIS, and bring spatial data and analytics to SAS.

SAS stores its data in libraries. You reference a SAS dataset by specifying the libref name and dataset name in this format: libref.SAS-dataset-name. For example, the statement sasuser.sales references the sales dataset found in the sasuser library. The SAS To Table and Table To SAS tools have parameters that require you to specify the SAS dataset in this format.

When a SAS session begins on a local deployment, the SASUSER, WORK, SASHELP, MAPS, MAPSSAS, and MAPSGFK libraries are available by default. Because each SAS geoprocessing tool begins a new SAS session, the tools can only read and write to these libraries by default. So what can you do if your SAS datasets are stored in custom libraries that aren’t available by default?

You can make your custom libraries available to every new SAS session using an autoexec.sas file. This file contains SAS code that is executed immediately after a SAS session begins. In this example autoexec.sas file below, a SAS libname statement is used to create a libref (a reference to a SAS library) for a custom library named saleslib. When the SAS-ArcGIS bridge tools start a SAS session, the saleslib library will be recognized and available for reading and writing.

You can create the autoexec.sas file with any text editor. When a SAS session begins, it will search for the autoexec.sas file in various places on the local hard drive, so you must save the file in one of them. SAS will search for this file in its current folder, paths that are specified by the Windows PATH environment variable, the root folder of the current drive, and the folder that contains the SAS.EXE file. You can learn more about the autoexec.sas file here.

Visit our resources page to learn more about these and other Spatial Statistics capabilities.

Share this article

Subscribe
Notify of
0 Comments
Oldest
Newest
Inline Feedbacks
View all comments