SAS 9.1.3 Integration Technologies » Developer's Guide


Publish Package Interface
Publish/Retrieve Encoding Behavior
Publishing Packages
INSERT_CATALOG
INSERT_DATASET
INSERT_FDB
INSERT_FILE
INSERT_HTML
INSERT_MDDB
INSERT_PACKAGE
INSERT_REF
INSERT_SQLVIEW
INSERT_VIEWER
PACKAGE_BEGIN
PACKAGE_END
PACKAGE_PUBLISH
LDAP Channel Store Syntax
SAS Metadata Repository Channel Store Syntax
Retrieving Packages
COMPANION_NEXT
ENTRY_FIRST
ENTRY_NEXT
PACKAGE_DESTROY
PACKAGE_FIRST
PACKAGE_NEXT
PACKAGE_TERM
RETRIEVE_CATALOG
RETRIEVE_DATASET
RETRIEVE_FDB
RETRIEVE_FILE
RETRIEVE_HTML
RETRIEVE_MDDB
RETRIEVE_NESTED
RETRIEVE_PACKAGE
RETRIEVE_REF
RETRIEVE_SQLVIEW
RETRIEVE_VIEWER
Filtering Packages
Publishing Examples
Publishing in the Data Step
Publishing in a Macro
Publishing with FTP
Publishing Framework

Publish to a WebDAV-Compliant Server

Publishes a package to a WebDAV-compliant server.

Syntax

CALL PACKAGE_PUBLISH(packageId, publishType, rc, properties,< propValue1, ...propValueN>

packageID
Numeric, input.
Identifies the package that is to be published.

publishType
Character, input.
Indicates how to publish the package. To publish the package using the WebDAV transport, specify a publishType of TO_WEBDAV.
rc
Numeric, output.
Receives a return code.

properties
Character, input.
Identifies a comma-separated list of optional property names. Specify any of the following property names, or specify '' to indicate that no properties are to be applied:

propValue1, ...propValueN
Character/Numeric, input.
Specifies one value for each specified property name. The order of the property values must match the order of the property names in the properties parameter.

Details

Default Behavior

Publishing with a publishType of TO_WEBDAV publishes a package to a specified URL on a WebDAV-compliant server. WebDAV servers enable distributed authoring and versioning, which enables collaborative development of Web files on remote servers.

The WebDAV transport stores package entries as members of a collection.

If you specify the COLLECTION_URL property, the package is published to the specified URL on a WebDAV-compliant Web server. When you use COLLECTION_URL, the default behavior is to replace the existing collection and its nested directories at that location. If you do not want to replace an existing collection and its nested directories, you must use the IF_EXISTS property. An example of a collection URL is

   http://www.host.com/AlphaliteAirways/revenue/quarter1

The collection is named quarter1.

The PARENT_URL property is similar to the COLLECTION_URL property except that it specifies the location under which the new WebDAV collection is to be placed. The PUBLISH_PACKAGE CALL routine generates a unique name for the new collection. The unique name is limited to eight characters with the first character as an s. An example of a parent URL directory location is http://www.host.com/AlphaliteAirways/revenue. An example of a collection name that is automatically generated might be s9811239.

The specifications of the COLLECTION_URL property and the PARENT_URL property are mutually exclusive.

To announce the availability of new WebDAV collections on WebDAV-compliant servers, use a publishType of TO_SUBSCRIBERS or TO_EMAIL.

WebDAV publishing uses the following file extensions for each item type:

Item Type File Extension
CATALOG .sac
DATA .sad
FDB .saf
MDDB .sam
VIEW .sav

Viewer Properties

If you specify the VIEWER_NAME property with the COLLECTION_URL or PARENT_URL property, the view is rendered in HTML format. If you specify the TEXT_VIEWER_NAME with the COLLECTION_URL or PARENT_URL properties, the view is rendered in text format.

The specified viewer is used to create a rendered view that is named index.html. To override the default name that is assigned to the rendered view, use the APPLIED_VIEWER_NAME or APPLIED_TEXT_VIEWER_NAME, as appropriate, to specify a file name for the rendered view.

Archive Path Properties

If you specify the ARCHIVE_PATH property, an archive is created and published as a binary package on a WEBDAV-compliant server. All entries that are inserted into the package are published as an archive. If you specify a value for ARCHIVE_PATH, the created archive is stored at the designated location. To create a temporary archive that is deleted after the package is published, specify an ARCHIVE_PATH value of "" or "tempfile".

For more details on how to use the archive properties, see How to Specify an ARCHIVE_PATH.

Note: In order to create an archive under the z/OS operating environment, the z/OS environment must support UNIX System Services directories.

When publishing a binary package with the WEBDAV transport, you can specify the following archive properties: ARCHIVE_NAME, ARCHIVE_PATH, HTTP_PASSWORD, HTTP_PROXY_URL, or HTTP_USER.

Applying a Name/Value Pair to a Package and a Package Item

When publishing to a WebDAV-compliant server, optionally specified name/value pairs are transmitted to the WebDAV server in XML format. XML format requires that the name portion of the name/value pair specification follow these conventions:

  • It must begin with an alphabetic character or an underscore
  • It can contain these types of characters only: alphabetic, numeric, and these special characters:
    • . (period)
    • - (hyphen)
    • _ (underscore)

If a namespace is associated with the name portion of a name/value pair, the name can also include a colon (:). Name/value pairs not explicitly associated with a namespace might not be retained by the WebDAV server. For details about the NAMESPACE property, see PACKAGE_BEGIN.

For details about specifying the nameValue parameter for an entire package, see PACKAGE_BEGIN. For details about specifying the nameValue parameter for a single package item, see the applicable INSERT_item CALL routine, where item can be any of the following:

Examples

Example 1

The following example publishes a package to the specified URL:

   rc = 0;
   pubType = "TO_WEBDAV";
   properties="COLLECTION_URL";
   cUrl = "http://www.alpair.web/NightlyMaintReport";
   CALL PACKAGE_PUBLISH(packageId, pubType, 
      rc, properties, cUrl);

Example 2

The following example publishes a package to a URL via the specified proxy server using the specified credentials:

   rc = 0;
   pubType = "TO_WEBDAV";
   properties="COLLECTION_URL,HTTP_PROXY_URL,
      IF_EXISTS,HTTP_USER,HTTP_PASSWORD";
   cUrl = "http://www.alpair.secureweb/NightlyMaintReport";
   pUrl = "http://www.alpair.proxy:8000/";
   exists = "update";
   user = "JohnSmith";
   password = "secret";
   CALL PACKAGE_PUBLISH(packageId, pubType, rc, properties, 
      cUrl, pUrl,  exists, user, password);

Example 3

The following example uses the e-mail transport to publish a collection URL on a WebDAV-compliant server. The HTTP user ID and password enable the publisher to bind to the secured HTTP server. All e-mail recipients who are members of the mail list receive the e-mail announcement that the best rates are accessible at the specified URL.

   pubType = "TO_EMAIL";
   properties="COLLECTION_URL, SUBJECT, 
      HTTP_USER, HTTP_PASSWORD";
   collurl="http://www.alphaliteairways/fares/discount.html";
   subj="Announcing Best Rates Yet";
   http_user="vicdamone";
   http_password="myway";
   Addr = "admins-l@alphaliteair05";
   CALL PACKAGE_PUBLISH(packageId, pubType, rc, properties, 
      collurl, subj, http_user, http_password, Addr);

Example 4

The following example uses the ARCHIVE_PATH property to publish a binary package to the WebDAV-compliant server. The archive path is specified as "tempfile" so that the locally created archive file will be deleted once it has been published to the WebDAV server.

   pubType = "TO_WEBDAV";
   properties="COLLECTION_URL, ARCHIVE_PATH";
   cUrl = "http://www.alpair.secureweb/Reports";
   apath = "tempfile";
   CALL PACKAGE_PUBLISH(packageId, pubType, rc, 
      properties, cUrl, apath);