ArcGIS Pro

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

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 file. This file contains SAS code that is executed immediately after a SAS session begins. In this example 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 file with any text editor. When a SAS session begins, it will search for the 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 file here.

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

About the author

Kevin Butler is a Product Engineer on Esri’s Analysis and Geoprocessing Team working as a liaison to the science community. He holds a Ph.D. in Geography from Kent State University. Over the past decade he has worked on strategic projects, partnering with customers and other members of the science community to assist in the development of large ecological information products such as the ecological land units, ecological marine units and ecological coastal units. His research interests include a thematic focus on spatial statistical analytical workflows, a methodological focus on spatial clustering techniques and a geographic focus on Puerto Rico and midwestern cities.

Notify of
Inline Feedbacks
View all comments

Next Article

Editable Hillshade and Contours

Read this article