SAS Institute. The Power to Know

SAS(R) 9.2 Publishing Framework: Developer's Guide

Previous Page | Next Page

Publishing Packages

PACKAGE_BEGIN



Initializes a package and returns a unique package identifier
Syntax
Arguments
Details
Examples

Syntax

CALL PACKAGE_BEGIN(packageId, desc, nameValue, rc<, properties, propValue1, ...propValueN>);

Arguments

packageId

identifies the new package.

Type: Numeric
Direction: Output
desc

describes the package.

Type: Character
Direction: Input
nameValue

identifies a list of one or more space-separated name/value pairs, each in one of the following forms:

  • name

  • name=value

  • name="value"

  • name="single value with spaces"

  • name=(value)

  • name=("value")

  • name=(value1, "value 2",... valueN)

Name/value pairs are site-specific; they are used for the purpose of filtering. See filtering.

Type: Character
Direction: Input
rc

receives a return code.

Type: Numeric
Direction: Output
properties

identifies a comma-separated list of optional property names. Valid property names are as follows:

  • ABSTRACT

  • EXPIRATION_DATETIME

  • NAMESPACES

Type: Character
Direction: Input
propValue1, ...propValueN

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. Valid property values are defined as follows:

ABSTRACT

provides an abstract (short summary) of the inserted package.

EXPIRATION_DATETIME

numeric SAS datetime value. This value should be specified in GMT format. For details, see SAS Language: Reference.

NAMESPACES

specifies unique names that associate published packages with specific contexts on a WebDAV-compliant server. The association of a namespace with a package organizes package data on a server according to meaningful criteria or contexts. A namespace is an additional scoping criterion for a name/value description of a package or package entry. When you publish a package to WebDAV, the name/value descriptors are stored with the package or its entries to the specified WebDAV namespaces. As an example, a package might be described as containing first quarter profits that were generated by the Houston office. The specified description and scope uniquely define the package so that consumers can filter name/value pairs on packages or entries unambiguously. An example of a namespace definition that you enter in the Namespaces field follows:

HOUSTON='http://www.AlphaliteAirways.com/revenue/final'
A namespace specification is case sensitive with single quotation marks surrounding embedded values. To specify multiple namespaces, separate each namespace definition with a space. For details about retrieving packages with the aid of scoping and filtering criteria, see Specifying Name/Value Pairs.
Type: Character or Numeric
Direction: Input

Details

The package identifier returned by this CALL routine is used in subsequent INSERT and PACKAGE CALL routines.


Examples

The following example initializes a package and returns the package identifier in packageId.

packageId=0;
rc=0;
desc = "Nightly run.";
nameValue='';
CALL PACKAGE_BEGIN(packageId, desc, nameValue, rc);

The following example initializes a package with an expiration date and returns the package identifier in packageId.

packageId=0;
rc=0;
desc = "Nightly run.";
nameValue='';
dtValue = '20apr2010:08:30:00'dt;
CALL PACKAGE_BEGIN(packageId, desc, nameValue,
   rc, "EXPIRATION_DATETIME", dtValue);

The following example initializes a package with an expiration date and an abstract character string and returns the package identifier in packageId.

packageId=0;
rc=0;
desc = "Nightly run.";
nameValue='';
dtValue = '20apr2010:08:30:00'dt;
abstract = "This package contains company
   confidential information.";
properties="EXPIRATION_DATETIME, ABSTRACT";
CALL PACKAGE_BEGIN(packageId, desc, nameValue,
   rc, properties, dtValue, abstract);

The following example initializes a package with two namespaces and returns the package identifier in packageId.

packageId=0;
rc=0;
desc = "Nightly run.";
nameValue='';
namespaces = 'A="http://www.alpair.com/myNamespace1"
   B="http://www.alpair.com/myNamespace2"';
CALL PACKAGE_BEGIN(packageId, desc, nameValue,
   rc, "NAMESPACES", namespaces);

Previous Page | Next Page | Top of Page