When you use the SAS Stored Process Web Application to run a SAS® Stored Process in SAS® 9.2, you can publish the output to a WebDAV server. You can choose from several shared prompts to create a SAS Stored Process that publishes a package to a WebDAV server.
To select a shared prompt, follow these steps:
You can choose from four shared prompts to publish to a WebDAV server:
This shared prompt contains the following parameters:
If this value is blank, then the package publishes with a randomly assigned package name to the following directory: /sasdav/Users/your-user-name/PR/MyResults
If the value is not blank, then you need to manually create a directory under the MyResults directory on your WebDAV server for each user. For example, if the value is Test, then you need to manually create a Test directory for each user in the following location:
/sasdav/Users/your-user-name/PR/MyResults/Test
Click the Full Code tab above for an example of SAS code, WebDAV_Example1.sas, that is used with this prompt.
Caution: This prompt can delete existing data from your WebDAV server. Check that your parameter values are set appropriately before you use this prompt.
This shared prompt contains the following parameters:
The package output publishes to a location in the client user's Personal Repository. A value must be assigned to this parameter. Choose the value for your directory location carefully. This value should be the name of a new directory under the Personal Repository. If you specify an existing directory, then all of the existing content in this directory and the subdirectories is deleted and replaced with the new content.
For example, if the value is Dept10_Sales, then the output is saved in the client user's Personal Repository at /sasdav/Users/your-user-name/PR/MyResults/Dept10_Sales.
This shared prompt contains the following parameters:
The package publishes with a randomly assigned package name to a directory on your WebDAV server. For example, the directory might be as follows:
http://your.server:8080/SASContentServer/repository/default/sasdav/Publish.
Click the Full Code tab above for an example of SAS Stored Process code, WebDAV_Example2.sas, that is used with this prompt.
Caution: This prompt can delete existing data from your WebDAV server. Check that your parameter values are set appropriately before you use this prompt.
This shared prompt contains the following parameters:
The package is saved in a directory on your WebDAV server. Choose the value for your directory location carefully. This value should be the URL address of a new directory on the WebDAV server. If you specify the URL of an existing directory, then all of the existing content in this directory and the subdirectories is deleted and replaced with the new content.
A SAS Stored Process that uses any of the prompts above can be run in the background by using the SAS Stored Process Web Application. For more information about running a SAS Stored Process in the background, see SAS Note 39114, "Tips for running a SAS® Stored Process in Background mode using SAS® 9.2."
However, if you do not use the prompts above and a SAS Stored Process creates a package that runs in the background, the output automatically publishes to the client user's Personal Repository on the WebDAV server. The output is saved with a randomly assigned package name at /sasdav/Users/your-user-name/PR/MyDocuments.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
Below are two examples of code that are used with different shared prompts:
WebDAV_Example1.sas
/****************************************************************/
/* NAME: WebDAV_Example1.sas */
/* */
/* This stored process publishes a package to a WebDAV server. */
/* Is uses a Personal Repository. */
/* */
/* This stored process code is used with the */
/* "Package - Personal Repository with New Instance" prompt. */
/* */
/* The stored process passes the following parameters: */
/* */
/* _RESULT = PACKAGE_TO_WEBDAV */
/* _PR_COLLECTION_PATH - Can be blank or have a value. */
/* _PUBLISH_TO_PR = true */
/* _CREATE_NEW_PACKAGE_INSTANCE = true */
/****************************************************************/
*ProcessBody;
%let _DESCRIPTION=Class Report: &SYSDATE9 ;
/* Note: debug=1 is for debugging. */
%stpbegin(debug=1);
proc print data=sashelp.class;
run;
%stpend(debug=1);
/* The following statements are helpful for debugging problems. */
%put _collection_url is: *&_collection_url*;
%put _archive_fullpath is: *&_archive_fullpath*;
%put _publish_to_pr is: *&_publish_to_pr*;
%put _create_new_package_instance is: *&_create_new_package_instance*;
%put _pr_collection_path is: *_pr_collection_path*;
%put _archive_path is: *&_archive_path*;
WebDAV_Example2.sas
/****************************************************************/
/* NAME: WebDAV_Example2.sas */
/* */
/* This stored process publishes a package to a WebDAV server. */
/* Is does not use a Personal Repository. */
/* */
/* This stored process code is used with the */
/* "Package - WebDAV with New Instance" prompt. */
/* */
/* The stored process passes the following parameters: */
/* */
/* _RESULT = PACKAGE_TO_WEBDAV */
/* */
/* _COLLECTION_URL - The full URL on your WebDAV server */
/* where the package will be saved. */
/* */
/* _CREATE_NEW_PACKAGE_INSTANCE = true */
/****************************************************************/
*ProcessBody;
%let _DESCRIPTION=Class Report for Class 10: &SYSDATE9 ;
/* Note: debug=1 is for debugging. */
%stpbegin(debug=1);
proc print data=sashelp.class;
run;
%stpend(debug=1);
/* The following statements are helpful for debugging problems. */
%put _collection_url is: *&_collection_url*;
%put _archive_fullpath is: *&_archive_fullpath*;
%put _create_new_package_instance is: *&_create_new_package_instance*;
%put _archive_path is: *&_archive_path*;
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
Type: | Sample |
Date Modified: | 2010-12-06 11:18:39 |
Date Created: | 2010-06-09 23:35:42 |
Product Family | Product | Host | SAS Release | |
Starting | Ending | |||
SAS System | SAS Integration Technologies | z/OS | 9.2 TS2M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS2M0 | |||
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS2M0 | |||
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS2M0 | |||
Microsoft Windows XP 64-bit Edition | 9.2 TS2M0 | |||
Microsoft® Windows® for x64 | 9.2 TS2M0 | |||
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS2M0 | |||
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS2M0 | |||
Microsoft Windows Server 2003 Standard Edition | 9.2 TS2M0 | |||
Microsoft Windows Server 2003 for x64 | 9.2 TS2M0 | |||
Microsoft Windows Server 2008 for x64 | 9.2 TS2M0 | |||
Microsoft Windows XP Professional | 9.2 TS2M0 | |||
Windows Vista | 9.2 TS2M0 | |||
Windows Vista for x64 | 9.2 TS2M0 | |||
64-bit Enabled AIX | 9.2 TS2M0 | |||
64-bit Enabled HP-UX | 9.2 TS2M0 | |||
64-bit Enabled Solaris | 9.2 TS2M0 | |||
HP-UX IPF | 9.2 TS2M0 | |||
Linux | 9.2 TS2M0 | |||
Linux for x64 | 9.2 TS2M0 | |||
Solaris for x64 | 9.2 TS2M0 |