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 an Archive

Publishes a package to an archive.

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 archive transport, specify TO_ARCHIVE.

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, input.
Specifies a 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

The ARCHIVE_NAME property identifies the name of the archive file to create. If this property is omitted, the archive transport generates a unique name by default.

The ARCHIVE_PATH property identifies where the archive is created. This property can be a physical path name, an LDAP URL, an FTP URL, or an HTTP URL.

Note: In the z/OS operating environment, an archive can be published only to UNIX System Services directories.

How to Specify an ARCHIVE_PATH

If ARCHIVE_PATH is an LDAP URL, it should represent the sasArchivePath distinguished name. The sasArchivePath entry within the LDAP directory contains a saspath attribute that is used to create the archive.

Furthermore, if an LDAP URL is specified and the LDAP server is running secured, you must specify the LDAP_BINDDN and LDAP_BINDPW properties (or bindname and password LDAP URL extensions) in order to bind to the LDAP server.

If ARCHIVE_PATH is an HTTP URL on a secured server, you must specify the HTTP_USER and HTTP_PASSWORD properties. Specifying the HTTP_PROXY_URL property is optional.

If ARCHIVE_PATH is an FTP URL on a secured host, you must specify the FTP_USER and FTP_PASSWORD properties.

Examples

Example 1

The following example creates the archive file named results in the /u/users directory.
   pubType = "TO_ARCHIVE";
   properties='archive_path, archive_name';
   path = '/u/users';
   name = 'results';
   CALL PACKAGE_PUBLISH(packageId, pubType, 
      rc, properties, path, name);

Example 2

The following example specifies the archive path as an LDAP URL that is the SasArchivePath distinguished name. The sasArchivePath entry contains a saspath attribute, which identifies where the archive will be created. In this example, because archive_name is omitted, the archive transport generates a unique name automatically.

   apath = 
      "ldap://pcc.host.com:389/sasarchivepathcn=HrArchive,
      saschannelcn=HR,cn=saschannels,
      sasComponent=sasPublishSubscribe,
      cn=SAS,o=Alphalite Airways,c=US";
   pubType = "TO_ARCHIVE";
   properties='archive_path';
   CALL PACKAGE_PUBLISH(packageId, pubType, 
      rc, properties, apath);