SAS Bridge to ESRI  

Run a SAS Stored Process

SAS Bridge for ESRI  

A stored process is a SAS program that is saved on a server and can be executed as required by a requesting application. After saving a SAS program, you can invoke it from ArcMap using a VBA (Visual Basic for Applications) macro that you define in and run from ArcMap.

To access a SAS stored process from ArcMap:

Define a SAS program:
  1. Select File New Program from the SAS menubar.
  2. Write your program. You can encapsulate any SAS data step or macro code in a stored process.
  3. Save the program. By default, the file extension is .sas. If you use this default extension, then you do not need to specify it in your ArcMap VBA macro.
Define a VBA macro in ArcMap:
  1. Select Tools Macros Visual Basic Editor from the ArcMap menubar.
  2. Select Tools References from the menubar of the Visual Basic Editor.
  3. Select the following from the References window:
    • SAS Integrated Object Model (IOM) Type Library
    • SAS WorkspaceManager 1.1 Type Library
  4. Select Insert Module from the menubar of the Visual Basic Editor.
  5. Type the macro code. Click here for a sample.
Run the macro:
  1. Select Tools Macros Macros from the ArcMap menubar.
  2. Select the macro you want to run.
  3. Click Run.

For additional information on SAS stored processes, see these resources:

Demos and Downloads