BI Tools

Tips and tricks for building information maps, OLAP cubes, reports, and dashboards

BI Admin

Learn your way around a SAS BI installation.

Visual Analytics

Learn your way around the SAS Visual Analytics tool

Coding & Data

Extract, transform, and load your data into the SAS BI toolset

Stored Processes

Create and design stored processes like a rock star

Home » Stored Processes

What Can I Do With a Stored Process?

Submitted by on 2012-02-26 – 9:39 AM 2 Comments

Often I refer to SAS Stored Processes as the workhorse of the SAS BI tools … you can use these little devils everywhere sometimes as Band-Aid, sometimes as the star, and sometimes as a background player. In a past post, I showed you how to use a stored process to add dashboard dials to Web Report Studio and Linking to a Stored Process from Web Report Studio.

Add-In for MS Office – View Reports or Data with a Stored Process

Use the stored process to deliver a report or maybe just a dataset (using Proc Print) to the Add-In for Microsoft Office (AMO). In the past, I set up several STPs that only contained a PROC PRINT to display a data set. Then I added a prompt for Product, which allowed the user to query product inquiries based on the product of interest.

Here’s how you access the stored process from AMO 4.3. This works similarly in prior versions of AMO.

  1. Open MS Excel (or Word/PowerPoint). On the SAS ribbon, click the Reports icon.
  2. Navigate to the STPs storage location and click the name.
  3. < Optional> This stored process has two prompts: Visitor Type and ODS Style. Yours may not have any. These can be changed later if you want to use different.
  • From the Choose Location window, select where you want the output placed. I selected a New
    Worksheet and used the default name. You can see it returned a short report.

stored process

Adding a Stored Process to the SAS Portal

You can add a stored process to a portal page. Simply add a Stored Process Portlet and click the Edit button on the menu bar. Navigate to the location and select it. If there are prompts associated with tit, you can see the value in the parameters area.

stored process for SAS Portal


Behind the Scenes Stored Processes for BI Dashboard

You can use stored processes to support other clients. For instance, you can use a stored process as a data source for the SAS BI Dashboard, as shown below. Create a new data indicator and select Stored Process as the data source. Then use the Browse button to navigate to the one you want. Once added, it executes and returns the data to the Preview area. Notice that the data set name (an_prdsale_example) is shown in the Published data set name field.

stored process SAS BI Dashboard

What else can you do with a Stored Process?

Here’s some other ways you can use them:

  • Use in Information Map Studio to query the RDBMS to return data to the information map or as a way to provide a prompt to the information map.
  • Use a custom graph in the SAS BI Dashboard.
  • Allow the BI Dashboard to link to a stored process where you can display a very custom report.

Angela and I presented papers at SAS Global Forum 2013 the first was a How to Create Your First SAS Stored Process and a more advanced one Stop Your Wine-ing: Use a Stored Process!


Learn More about SAS Stored Processes and Prompts

You can learn more tips and tricks for creating, debugging, and using SAS stored processes in the 50 Keys to Learning SAS Stored Processes book. It's a complete guide to SAS stored processes. Check Amazon for best pricing and quick shipping!

The following two tabs change content below.

Tricia Aanderud

Director of Data Visualization at Zencos Consulting
Tricia Aanderud is a SAS Business Intelligence and Visual Analytics consultant based in Raleigh, NC who works for Zencos Consulting. She has written several books about SAS, presented papers at many SAS conferences, and has been using SAS since 2001. Contact her for assistance with your next project.