Using the SAS Stored Process Web Application Pages

Welcome Page

To execute the SAS Stored Process Web Application, enter the application's URL in the Web browser. Either the default Welcome page or static data is displayed.
Here is an example of a URL for the SAS Stored Process Web Application:
http://yourserver.com:8080/SASStoredProcess/do
This is the default URL. If the SAS Stored Process Web Application is accessed as http://yourserver:8080/SASStoredProcess, then it defaults to http://yourserver:8080/SASStoredProcess/do. In this example, if the Welcome.jsp file is installed, then the Welcome page is displayed. The Welcome page might look like this one:
Stored Process Web Application welcome page
The Welcome page contains the following links:
Stored Process Samples
Click this link to display a page of stored process samples that are installed with the SAS Web Infrastructure Platform.
List Available Stored Processes
Click this link to display a page that contains a tree view of folders, stored processes, and stored process reports. You can select a stored process (or stored process report) in the tree view in order to run the stored process. For more information, see Tree View. If there are no parameters or input forms, then the stored process executes immediately and the results are displayed. If there are parameters or input forms, then you are taken to the custom input form or prompt page.
Search for Stored Processes and Reports
Click this link to search for a stored process or stored process report. You can search for a string within the name, description, or keywords for a stored process or stored process report. No wildcards are accepted in the search term. You can also select one or more of the following columns to display in the search results: description, keywords, creation date, and modified date. For more information, see Search Page.
In the preceding example, if the Welcome.jsp file has not been installed, then static data is displayed. The static data might look like this:
   Stored Process Web Application
   Version 9.3 (Build 473)
Instead of navigating through this interface from the Welcome page, you can also use the _ACTION and _PROGRAM variables in the URL to open different pages. For more information, see Using Reserved Macro Variables.

Tree View

You can access the tree view of stored processes by appending the _ACTION variable with a value of INDEX (_ACTION=INDEX) to the SAS Stored Process Web Application URL. On the left, the tree view displays the same list of folders, stored processes, and stored process reports that you see when you click List Available Stored Processes on the Welcome page. When you click a stored process in the tree view, the default action is to execute that stored process.
Note: Any stored process that has the Hide from user check box selected in SAS Management Console does not show up in the tree view.
You can use the _PATH variable with _ACTION=INDEX to control what level the tree view begins with. For example, if you specify _PATH=/Products/SAS Intelligence Platform/Samples on the SAS Stored Process Web Application URL, then the Samples folder is at the top of the tree view.
The keywords properties, form, and execute can be added to the _ACTION variable to control which page is displayed when you select a stored process as shown in the following examples:
_ACTION=INDEX,PROPERTIES
displays the prompt page for the stored process. If there are no prompts, then only the Run button is displayed.
_ACTION=INDEX,FORM,EXECUTE
displays the custom input form (if available). Otherwise, the stored process executes.
_ACTION=INDEX,FORM,PROPERTIES,EXECUTE
displays the custom input form (if available). If there is no custom input form, then the prompt page for the stored process is displayed. If there are no prompts, then the stored process executes.

Summary Pages

Stored Process Summary Page

To display the summary page for a stored process, specify _ACTION=DATA&_PROGRAM=<stored-process-path> on the SAS Stored Process Web Application URL. (You can also add _ACTION=INDEX,DATA to the SAS Stored Process Web Application URL and then select a stored process in order to display this page.)
Stored process summary page
The following items are included on this page:
Metadata path
specifies the location of the SAS folder that contains the stored process. You can use this path as the value for the _PROGRAM variable. For more information, see Using Reserved Macro Variables.
Source code location
specifies the source code repository, where the SAS code is located.
Source file
specifies the name of the file that contains the SAS code.
SAS server type
specifies the type of server that is used to run the stored process (either a stored process server or a workspace server).
Result type
specifies the type of results that the stored process is capable of producing (can be Stream, Package, both, or neither of these).
Created
specifies the date and time that the stored process metadata was first registered.
Last modified
specifies the date and time that the stored process metadata was last modified.
Keywords
specifies any keywords that are associated with the stored process. These keywords are part of the stored process metadata.
Description
contains a description of the stored process. This description is part of the stored process metadata.
To run the stored process, click Run at the bottom of the summary. If there are no parameters or input forms, then the stored process executes immediately and the results are displayed. If there are parameters or input forms, then you are taken to the custom input form or prompt page.

Stored Process Report Summary Page

To display the summary page for a stored process report, specify _ACTION=DATA&_REPORT=<stored-process-report-path> on the SAS Stored Process Web Application URL. (You can also add _ACTION=INDEX,DATA to the SAS Stored Process Web Application URL and then select a stored process report in order to display this page.)
Stored process report summary page
The following items are included on this page:
Metadata path
specifies the location of the SAS folder that contains the stored process report. You can use this path as the value for the _REPORT variable. For more information, see Using Reserved Macro Variables.
Number of reports
specifies the number of stored process report generations that are currently available.
Maximum retained
specifies the maximum number of stored process report generations that can be saved at any time.
Created
specifies the date and time that the stored process report was first created.
Last modified
specifies the date and time that the stored process report was last modified.
Keywords
specifies any keywords that are associated with the stored process report.
Description
contains a description of the stored process report.
The bottom of the summary page shows all the generations of the stored process report that are available, including who created each one and when, and when each stored process report generation expires. You can click the number of a stored process report generation in order to view that generation. To run a new stored process report, click Run at the bottom of the summary.
To run a stored process report from the URL, the metadata location must be specified. This can be done using the parameters _PROGRAM=/myfolder/myreport&_TYPE=report. Alternatively, just the _REPORT parameter can be used, for example, _REPORT=/myfolder/myreport. This returns the latest stored process report generation or runs a new one if none are found. To return a specific stored process report, the parameter _REPORTID=ID can be added to the URL with the ID of the desired generation of the report. A _REPORTID=0 forces a new stored process report to be run.
Note: The stored process log is available only when the stored process report is run to generate new output.

Custom Input Form

If you want the SAS Stored Process Web Application to display a custom input form for a stored process, then you can use any of the following methods:
  • On the Welcome page, click the Stored Process Samples link to display a page of stored process samples that are installed with the SAS Web Infrastructure Platform. Each of these samples has a link and a description. Click any of these links to display the custom input form for that stored process.
  • Use the _PROGRAM variable along with _ACTION=FORM in the URL to display the custom input form for a stored process. For more information, see Specifying Custom Input Forms.
  • Select a stored process from the tree view. If the stored process has a custom input form, then it is displayed.
A custom input form might look like this:
Stored process custom input form
You can use the custom input form to execute the stored process. In this example, clicking Display SAS Output generates the following results:
Stored process results page

Prompt Page

In order to display the prompt page for a stored process, you can do one of the following:
  • Use the _PROGRAM variable along with _ACTION=PROPERTIES in the URL to display the prompt page for a stored process. For more information, see Specifying Prompt Pages.
  • Select a stored process from the tree view. If the stored process has parameters but does not have a custom input form, then the prompt page is displayed.
Note: If a stored process does not have any parameters, then it does not have a prompt page. If you click a stored process that does not have a prompt page or a custom input form, then the stored process is immediately executed.
If you have defined parameters groups, then the groups are shown as items in the menu on the left side of the prompt page. You can click each group name to display the parameters that are in that group. A prompt page without groups might look like this:
Stored process parameters page
This sample prompt page shows an example of a date range type parameter. Parameters must be defined in the stored process metadata in order for them to be visible in a prompt page. Parameters are called prompts in SAS Management Console. The stored process metadata is where the name, label, type, default value, and any constraints for a prompt are defined. Constraints help define which values are allowed for a prompt, how many values are allowed, and so on.
The prompt type determines how that parameter is displayed in the prompt page. You can have any of the following types of prompts in this page:
  • Text
  • Text range
  • Numeric
  • Numeric range
  • Date
  • Date range
  • Time
  • Time range
  • Timestamp
  • Timestamp range
  • Color
  • Data source
  • File or directory
  • Data library
For more information about how to create prompts and the constraints that can be specified for each type of prompt, see the help for prompts in SAS Management Console. For more information about how to specify values for prompt, and macro variables that are generated by prompts, see Formatting Prompt Values and Generating Macro Variables from Prompts.

Execution Options

Execution options are delivered as a sample shared prompt group that you can add to a stored process for use with the prompt page. Execution options are prompts that enable you to specify the graphic device, ODS destination, ODS style, and debugging options for a stored process at run time.
To add execution options to a stored process, perform the following steps:
  1. Open the Stored Process Properties dialog box for the stored process and click the Parameters tab.
  2. Select Add Shared.
  3. Under SAS Folders, navigate to /Products/SAS Intelligence Platform/Samples.
  4. Select Execution Options.
  5. Click OK.
The following table contains a list of the execution options and the SAS macro variables that they represent:
Execution Options
Execution Option
SAS Variable Name (Prompt Name)
Graphic device
_GOPT_DEVICE
Output format
_ODSDEST
ODS style
_ODSSTYLE
Debug options
_DEBUG

Search Page

You can access the search page for stored processes and stored process reports by appending the _ACTION variable with a value of SEARCH (_ACTION=SEARCH) to the SAS Stored Process Web Application URL. This is the seach.jsp file and is the same page that is displayed if you click Search for Stored Processes and Reports on the Welcome page. This form enables you to enter a search term and select what columns are to be displayed in the search results. No wildcards are accepted in the search term. The default behavior is to search the name fields of both stored processes and stored process report for the specified string, and to return only a Stored Processes column (which displays both stored processes and stored process reports, as well as the folders that contain these objects) and a Description column. You can either use the fields in the search page, or combine _ACTION=SEARCH with values for the _MATCH, _FIELD, _COLUMNS, _TYPE, or _PATH variables in order to modify search parameters.
Stored process search page
If you search for stored processes with Sample in their name and specify that you want all the columns to display, then the search results might look like the following table. You can click a stored process in the search results to execute that stored process. You can click a stored process report to display the last generation of that stored process report. If the stored process report has not been previously run, then it is run and then displayed. You can use the right mouse button on the column headings to sort the display by that column.
Stored process search results
Note: Any stored process that has the Hide from user check box selected in SAS Management Console does not show up in the search results.

XML Output

In addition to returning HTML output, the data for the various SAS Stored Process Web Application displays can be obtained in XML format. The keyword xml can be added to the _ACTION parameter to request that the corresponding data be returned as XML. The _ACTION values for the tree, data, properties, and search displays can be modified with the XML qualifier. Stand-alone clients such as Flex based applications can use the XML data to build non-HTML displays.