A stored process is a SAS program that is defined in metadata and stored either on a server or in metadata.
You can create a stored process by manually writing code in a Base SAS® session and then using SAS® Management Console to register that code in metadata. At the time of registration, you can point to a physical location for the code (a .sas file), or you can store the code in metadata. Instructions for writing and registering the stored process are in the SAS® Stored Processes: Developer's Guide.
You also can use SAS® Enterprise Guide® to create a stored process from a task or a process flow. When you are satisfied with the results, you can right-click on the process flow or task and select Create Stored Process. The Create Stored Process wizard adds the required syntax and registers the stored process in metadata.
Here are some things to keep in mind about executing stored processes in SAS Visual Analytics:
The topic “Working with Stored Processes” in Permissions by Task (SAS® Intelligence Platform: Security Administration Guide) lists the metadata permissions that are required for the account under which the stored process is executing.
If you chose to store the code in a .sas file, then the launch credentials or the requesting user must also have Read and Write access to the physical location of the code.
You can use SAS® Visual Analytics Designer to create a report that includes a stored process. To add the stored process to a report, drag a Stored Process object (located beneath Other on the Objects tab) onto the report canvas. In the Open dialog box, navigate to the metadata folder that contains the registration for the stored process. Select the stored process, and then click Open to render the results.
Here are some tips for creating a report that includes a stored process:
Prompted stored processes behave differently depending on the mode (classic or modern), whether the prompts are required, and whether the prompts have default values. For details, see How Designer, Web Viewer, and the Home Page Handle Prompted Stored Processes at the end of this article.
Here are some tips about opening stored processes, depending on the client:
The following table describes how prompted stored processes are handled when they are added to a report in the designer, and when they are opened directly in the web viewer and from the home page. The behavior depends on the mode (classic or modern), whether the prompts are required, and whether the prompts have default values.
Required |
Default Values |
Designer |
Home Page and Web Viewer (classic) |
Home Page and Web Viewer (modern) |
Yes |
Yes |
Renders with default values. Click the Edit Prompts button on the Properties tab to select different values. |
Prompts are displayed. You must confirm the current values or select new values. |
Renders with default values. You cannot change the values. |
Yes |
No |
Empty prompts are displayed. Click the Edit Prompts button on the Properties tab to select prompt values. |
Empty prompts are displayed. You must select values to render results. |
An error appears because the prompts are required but you are not allowed to select prompt values. The stored process cannot be executed. |
No |
Yes |
Renders with default values. Click the Edit Prompts button on the Properties tab to select different values. |
Prompts are displayed. You must confirm the current values or select new values. |
Renders with default values. You cannot change the values. |
No |
No |
A blank page appears. Click the Edit Prompts button on the Properties tab to select prompt values. |
Empty prompts are displayed. You must select values to render results. |
A blank page appears because there are no default values. You cannot select values, so the stored process cannot be executed. |
For more information about how the individual SAS Visual Analytics clients use stored processes, see the SAS® Visual Analytics User’s Guide for your release of SAS. There are prerequisites for printing stored processes, which are explained in the User’s Guide.
In addition, here is a list of related SAS notes:
Usage Note 50406: Sample stored processes might not render results in SAS® Visual Analytics
Usage Note 56401: In SAS® Visual Analytics Viewer, stored process output might temporarily disappear
Usage Note 48498: Adding a comment to a stored process in SAS® Visual Analytics Viewer
-----------------------------------
*This article applies to releases 7.1, 7.2, and 7.3.
A fantastic and resourceful guide for those that are looking to use SAS Stored Processes with SAS Visual Analytics! Thanks @Madelyn_SAS. I look forward to share this. 😀
Do we need SAS EBI + SAS VA , if we are including them as part of a SAS VA Report. if yes , is it safe to assume that processing will always go to the SAS STP server , and not the workspace server.
You do not have to license EBI in order to use SAS Visual Analytics to display stored process output. However, a SAS Visual Analytics license has limited access to Base SAS and SAS/GRAPH procedures, so some of your stored processes might not run. The execution server depends on which server you selected when you registered the stored process in SAS Management Console. You can explicitly select to use the SAS Stored Process Server.
I need to do more reading on what I can do with Stored Processes. Maybe it's a way to resolve some limitations of paramater passing in VA.
Great concise article.
Thank you.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.