PACKAGE_BEGIN

Initializes a package and returns a unique package identifier

Syntax

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

Required Arguments

packageId
identifies the new package.
Type:Numeric, Output
desc
describes the package.
Type:Character, 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.
Type:Character, Input
rc
receives a return code.
Type:Numeric, Output

Optional Arguments

properties
identifies a comma-separated list of optional property names. Valid property names are as follows:
  • ABSTRACT
  • EXPIRATION_DATETIME
  • NAMESPACES
Type:Character, 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.
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. For 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.
Type:Character or Numeric, Input

Details

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

Examples

Example 1: Using PACKAGE_BEGIN

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);

Example 2: Using PACKAGE_BEGIN and Setting an Expiration Date

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);

Example 3: Using PACKAGE_BEGIN and Specifying an Abstract

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);

Example 4: Using PACKAGE_BEGIN and Specifying Namespaces

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);