Sas Enterprise Guide provides a wizard named the Stored Process Manager that guides the user through the steps of creating a stored process.
The wizard automatically
SAS Enterprise Guide is the preferred way to develop and test stored processes in SAS®9 because, you can create and test the program in one application.
Stored processes can be created from a variety of sources, including
SAS Enterprise Guide uses the Create New Stored Process Wizard.
This demonstration shows how to create, register and run stored processes using SAS Enterprise Guide.
Right-click on One-Way Frequencies task in the Process Flow window and select Create Stored Process….
In Step 1 of the wizard, accept the default name and enter a description and keywords (if desired).
3. In Step 2, select the repository on the metadata server to store the stored process metadata item.
4. Expand the Foundation repository, and select the Training group:
Select
Select
5. In Step 3, set the Execution server to SASMain – Logical Stored Process Server – SAS Stored Process Server – 9.1.
6. Select the Source file path
7. Accept the default source filename (this is the file that is being created for you by the SAS Enterprise Guide Stored Process Wizard).
Select
8. Accept the defaults in Step 4.
This window shows the LIBNAME statement that will be added to the new program in order to access the source table. By default, these are set up using the Metadata Libname Engine.
Select
9. Accept the defaults in Step 5 since this stored process has no parameters.
If parameters were needed to run this stored process, they would be added in this step.
Select
10. Step 6 allows you to choose how the output will be packaged. Select Streaming output, since the results of this stored process will be streamed back to the application that is was called from.
Select
11. In Step 7, verify that the information is correct:
Select
12. A message window displays indicating the stored process was successfully saved:
Select
13. The stored process is now part of the project:
14. Open the Stored Process List window to see this new stored process by selecting View ÐStored Process List.
The Stored Process Manager in SAS Enterprise Guide can be used to create a stored processes from existing SAS code. The wizard will scan the code for macro variables and lead you through a process of creating parameters from them. This greatly simplifies the process of creating stored processes from legacy code. To begin, add the existing program to the project.
15. Select File Ð Open Ð From My Computer….
16. Navigate to C:Workshopwinsassbiovr and select customerlist.sas:
Select . The code is displayed and added to the
17. Remove %let num=20; from the code.
18. Right-click on this new code node and select Create Stored Process. The Stored Process Wizard opens.
19. In Step 1, accept the default Name and specify a Description of Generated by Enterprise Guide.
Checkout SAS BI Interview Questions
Select
20. In Step 2, verify that the location is //Foundation/Training and select
21. In Step 3, verify that the execution server is SASMain – Logical Stored Process Server – SAS Stored Process Server – 1, the source file path is
accept the default source filename and select
22. In step 4, the wizard can help build parameters based on macro variables in the code.
a. Select then Parameters from SAS Code.
b. Change the text of User prompt to Number of Records.
c. Select Integer as the Data type.
d. Enter a Default Value of 10.
e. Select the Required Option.
f. Select the Constraints tab to limit the possible choices for this parameter.
Select
g. This parameter is saved and a message window opens, notifying you that no additional macro variables have been located in the code:
Select
The information about the num parameter is displayed:
Select
23. For Step 5, verify that Streaming output is selected, then choose
24. For Step 6, review the settings and select
25. A confirmation window appears:
Select
26. A message may appear:
Select to update the code task.
27. The new stored process has been added to the project and the Stored Process List window.
28. In the Process Flow window, right-click on the new stored process and select Run this Stored Process.
29. A dialog window opens requesting a value for the parameter num. Enter 8 then select
30. The HTML report appears:
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.