>>The ability to store your SAS programs on the server provides an effective method for change control management.
>>The stored process concept becomes even more powerful when you consider that these SAS programs can be invoked from multiple client contexts.
>>Using stored processes also enhances security and application integrity because the programs that access your sensitive data are contained on the server instead of being widely distributed with the client applications.
>>Instead of embedding the SAS code into client applications, you can centrally maintain and manage this code from the server. This gives you the ability to change your SAS programs and at the same time ensure that every client that invokes a stored process will always get the latest version available.
Stored processes can be used for
Stored processes can access
A stored process can produce any kind of output that a SAS program can produce:
Stored processes can be accessed/executed from several different client environments:
Existing or new SAS code can be converted to a stored process and that stored process is registered in the SAS Management Console.
Beginning with version 3, SAS Enterprise Guide is the preferred method for working with stored processes because it provides the ability to create, register, and test stored processes from one interface.
Stored processes can be accessed/executed from different Web-based environments:
|Related Article: SAS BI Interview Questions and Answers|
Metadata is used in stored processes to describe
Stored processes can be hosted by two types of servers:
These two servers are similar but have different capabilities.
The Stored Process Server
Because the stored process server runs under the SASSRV user ID, the stored process code can access two macro variables to identify the user:
|_metaperson||specifies the person metadata name that is associated with the _METAUSER login variable. The value of this variable can be UNKNOWN.|
specifies the login username that is used to connect to the metadata server.
Example: These macro variables can be used in the stored process code in a FOOTNOTE statement to identify who executed the stored process:
Make sure to use double quotes around the string so that the macro variable values will be resolved.
The Workspace Server
If you want to use a stored process to provide data to an information map, it must be executed on a workspace server, and that workspace server must be the same one that runs the information map.
Stored processes are generally backward compatible with the SAS/IntrNet Application Dispatcher.
Most existing Application Dispatcher programs can be registered as a stored process with little or no conversion. This is possible because Application Dispatcher programs and stored processes share many capabilities, including
This demonstration shows the metadata information stored for a sample stored process. Start the SAS Management Console by selecting Start Ð All Programs Ð SAS Ð SAS Management Console, select the BIArchitecture metadata profile, and enter the username and password provided by the instructor.
2. Expand Stored Process Manager in the Navigation Tree.
3. Expand the Samples group.
4. Select the Stored Processes group.
The sample stored processes are displayed in the Display Area.
The physical programs for the Stored Process Samples are stored in C: Program Files SASSAS 9.1inttechsample.
5. Right-click on the Hello World sample and select Properties from the pop-up menu.
6. The General tab provides the name, description, and keywords for the stored process.
Keywords are useful when you search for a specific stored process in applications such as the SAS ID Portal.
7. The Execution tab provides important information about which server, the stored process will be executed on, where the stored process source code is located, and input and output options.
The SAS server where the stored process will execute.
The directory where the physical SAS program is stored. This is not the metadata repository. It is an operating system location where the SAS program resides.
The name of the .sas file that contains your Stored Process.
The results of the stored process will be delivered. Choices include:
A stored process result type in which the content generated by the stored process is delivered to the client through an output stream. The output stream is generally visible to the stored process as the _WEBOUT filtered.
transient result package
A container for content that was produced by a SAS program execution or a third-party application for immediate use and that is not saved. After you disconnect from the server, the transient result package disappears.
permanent result package
A container for content that was produced by a SAS program execution or a third-party application and that is written to a specific location. Permanent result packages remain in existence, even after the stored process completes execution and you disconnect from the server.
In cases where there is no report (such as when you are only creating a data set).
8. The Parameters tab is where parameters are defined for the stored process. Parameters used in stored processes are similar to those used in SAS Application Dispatcher programs. You pass parameters to the SAS program, which then uses them as macro variables that can change the behavior and output of the program.
The Hello World sample has no parameters. It can run without any additional information from the user.
9. The Authorization tab is used to determine who can view, use, and update the stored process.
10. Select to close the Properties window.
11. Select File Ð Exit to exit the SAS Management Console.
Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!
Vinod M is a Big data expert writer at Mindmajix and contributes in-depth articles on various Big Data Technologies. He also has experience in writing for Docker, Hadoop, Microservices, Commvault, and few BI tools. You can be in touch with him via LinkedIn and Twitter.
Copyright © 2013 - 2023 MindMajix Technologies