Implementation & Administration Guide 1.1 |
This page provides examples of metadata for stored processes. The examples are based on the stored process prdsale1.sas, which is installed automatically in the demo portal. You can find the source file for this stored process in the "SASDemos" directory within the portal's installation directory. When you log on to the portal with the user name "portaldemo," the stored process appears in the Reports window as "Product Sales Demo."
To view this metadata, open the IT Administrator interface, select the Applications button, and select the Portal Demo Stored Processes entry under Stored Process Paths, as shown below.
The stored process path is the complete path to the file on which the stored processes reside. The logical name identifies the server. (For information about the SAS servers defined in your enterprise directory, select the SAS Configuration button.)
If you want to define another stored process path, choose File, New from the menu bar and enter the path information in the following dialog box:
In IT Administrator, you can view the metadata for the stored process prdsale1.sas by selecting Product Sales Demo in the tree under the Portal Demo Stored Processes path, as shown below.
The metadata for the stored process includes:
Note: Before placing the file name in the enterprise directory, IT Administrator appends it to the value of the descriptive label attribute, described above, followed by an underscore character.
In this example, IT Administrator appends the program file name prdsale1.sas to the descriptive label Product Sales Demo. The resulting value, Product Sales Demo_prdsale1.sas is assigned to the sasstoredprocessvalue
attribute on the entperprise directory. If you are entering your metadata directly into the enterprise directory, it is important to use this format for the sasstoredprocessvalue
attribute.
NAME=pCountry|LABEL=Country|DESCRIPTION=Country| REQUIRED=true|DEFAULT=| DATA_SOURCE=sasuniquename=prdsale,cn=sasTables, sascomponent=sasDataSources,cn=SAS, ou=Pubs,o=SAS Institute,c=US| REPORT_QUERY=select distinct country from sashelp.prdsale
NAME=pYear|LABEL=Year|DESCRIPTION=Year| REQUIRED=true|DEFAULT=| DATA_SOURCE=sasuniquename=prdsale,cn=sasTables, sascomponent=sasDataSources,cn=SAS, ou=Pubs,o=SAS Institute,c=US| REPORT_QUERY=select distinct year from sashelp.prdsale
The parameters pCountry and pYear have the same names as the variables that were defined in the prologue section of the SAS program prdsale1.sas.
The DATA_SOURCE is the the fully qualified distinguished name of the table that contains valid values for the parameter. In this case, the data source is a table. (You can see the metadata that have been defined for the table by selecting the SAS Data Sources button in the IT Administrator interface.)
The REPORT_QUERY contains an SQL statement to extract the valid values for pCountry (or pYear) from the table. When the stored process is invoked from the portal, these values will be placed in list boxes on the portal's default user input form.
Instead of defining a data source and report query for a parameter's valid values, you can hard-code the valid values into the parameter definition. This method may be appropriate when it is unlikely that the valid values will change. For example, here is the pCountry parameter definition with hard-coded valid values:
NAME=pCountry|LABEL=Country|DESCRIPTION=Country| REQUIRED=true|DEFAULT=|VALUES=CANADA,GERMANY,U.S.A.
If you want to define another stored process within a path, select the path and choose File, New from the menu bar. Then enter the stored process information in the following dialog box:
Implementation & Administration Guide 1.1 |