| Publishing Packages |
The Publish Package Interface consists of SAS CALL routines that enable you to write SAS programs, including stored processes, that create, populate, publish, and retrieve collections of information known as packages.
The process of publishing a package follows:
A package is created by using the PACKAGE_BEGIN CALL routine. For example,
CALL PACKAGE_BEGIN(pid, desc, nameValue, rc);
This CALL routine assigns a name to the package and any optional name/value pairs that are associated with it. Name/value pairs are used to assign metadata to a package or individual package entries. This metadata enables you to create filters that aid in information retrieval. The filters can be used both by subscribers to channels and by programs that search the package archive.
A package is populated by adding package entries by using the INSERT_* CALL routines. An entry can be a SAS file (for example, data set, catalog, or SAS MDDB), or almost any other kind of file, including HTML and images. CALL routines fall into two categories of item types:
SAS results:
unstructured content:
Call INSERT_DATASET(pid, libname, memname, description, NameValue, rc);
You can also nest packages by including a package as an entry in another package. Entries are referenced in the order in which they were added to the package.
Note: If inserting HTML file entries, see Publish and Retrieve Encoding Behavior. ![[cautionend]](../../../../common/61991/HTML/default/images/cautend.gif)
A package is published to a delivery transport by using the PACKAGE_PUBLISH CALL routine. Supported transports are e-mail addresses, a message queue, subscribers to a pre-defined channel, a WebDAV-Compliant server, and an archive. CALL routines for supported transports are as follows:
TO_ARCHIVE. See TO_ARCHIVE.
TO_EMAIL. See TO_EMAIL.
TO_QUEUE. See TO_QUEUE.
TO_SUBSCRIBERS. See TO_SUBSCRIBERS.
TO_WEBDAV. See TO_WEBDAV.
publishType = "TO_ARCHIVE" . . . CALL PACKAGE_PUBLISH (pid, publishType, rc, properties, archivePath, archiveName);
The end of the published package is defined by using the See PACKAGE_END CALL routine. For example,
CALL PACKAGE_END(pid, rc);
A package is retrieved from a delivery transport by using the following CALL routines:
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.