PACKAGE_PUBLISH (Publish Package to Archive)

Publishes a package to an archive

Syntax

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

Required Arguments

packageID
identifies the package that is to be published.
Type:Numeric, Input
publishType
indicates how to publish the package. To publish the package by using the archive transport, specify TO_ARCHIVE.
Type:Character, Input
rc
receives a return code.
Type:Numeric, Output
properties
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:
  • ARCHIVE_FULLPATH
  • ARCHIVE_NAME
  • ARCHIVE_PATH
  • FTP_PASSWORD
  • FTP_USER
  • GENERATED_NAME
  • HTTP_PASSWORD
  • HTTP_PROXY_URL
  • HTTP_USER
Type:Character, Input

Optional Argument

propValue1, …propValueN
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. Valid property values are defined as follows:
ARCHIVE_FULLPATH returns the complete URL path of the published archive on the server. The URL path includes the name of the archive, as specified by ARCHIVE_NAME or the generated name if ARCHIVE_NAME is not specified. This output property is returned only if ARCHIVE_PATH is specified.
ARCHIVE_NAME specifies a character string that indicates the name of the archive file.
ARCHIVE_PATH specifies a character string that indicates the path where the archive should be created.
FTP_PASSWORD indicates the password that is needed to log on to the remote host at which the archive will be stored. Specify this property only when the remote host is secured.
FTP_USER indicates the user ID that is needed to log on to the remote host at which the archive will be stored. Specify this property only when the remote host is secured.
GENERATED_NAME returns the name of the package, whether this value was generated by SAS or specified by another property. This property is an output property. If the package is published with a PARENT_URL, and ARCHIVE_PATH is not specified, then the package is published as a folder that contains the contents of the package and not as a .spk file. In this case, the return value for GENERATED_NAME will not be the name of the archive but the name of the package. For SharePoint, this is a folder name.
HTTP_PASSWORD indicates the password that is needed to bind to the Web server on which the package is published. Specify this property only when the Web server is secured.
HTTP_PROXY_URL indicates the URL of the proxy server.
HTTP_USER indicates the user ID that is needed to bind to the Web server on which the package is published. Specify this property only when the Web server is secured.
Type:Character, Input or Output

Details

The ARCHIVE_NAME property identifies the name of the archive file to create. If this property is omitted, then 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 pathname, an FTP URL, or an HTTP URL. 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, then you must specify the FTP_USER and FTP_PASSWORD properties.
Note: In the z/OS operating environment, an archive can be published only to UNIX System Services directories.

Example: Publishing a Package to an Archive

publishType = "TO_ARCHIVE";
properties='archive_path, archive_name';
path = '/u/users';
name = 'results';
CALL PACKAGE_PUBLISH(packageId, publishType,
   rc, properties, path, name);