SAS 9.1.3 Integration Technologies » Developer's Guide


SAS Publisher
Requirements
How SAS Publisher Works
Starting SAS Publisher
Publishing a Package
Defining Package Content
Specifying Package Destination
Specifying Package Format
Using SAS Publisher with SAS/Warehouse Administrator
Publishing Framework

Specifying Name/Value Pairs

Publishers can specify name/value pairs that describe the contents of the entire package and of individual package items. With these descriptors, primarily SAS channel subscribers who use SAS Subscription Manager can construct filters for determining what packages get delivered to them in their entirety. Although subscribers can filter at the package item level for the message queue only, a developer can write retrieval programs that filter at both the package level and the package item level for all transports.

The publisher can specify one or more space-separated name/value pairs for package items and entire packages in the following forms:

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

Specifying Name/Value Pairs for a Package Item

Here is an example of specifying a single name/value pair for a package item:

   type=dataset

The publisher identifies the item in the package as a data set.

To describe the package item with finer granularity, the publisher can specify multiple name/value pairs. A space separates each name/value pair. Here is an example of specifying multiple name/value pairs for a package item:

   type=dataset hub=RDU

The publisher identifies the item in the package as a data set, which is relevant only to the RDU hub.

Although a subscriber can filter at the package item level for a message queue only, a developer can write a retrieval program that filters at the package item level for all transports.

The publisher can specify name/value pairs when publishing a package item using the following methods:

Using SAS Publisher to Specify Name/Value Pairs for a Package Item

For an item inserted in a package, you can specify one or more name/value pairs in the optional Name/Value field in the Specify Item to Insert window. For example, you could specify

   type=dataset hub=RDU

This package entry is a data set, whose data is relevant to the RDU hub only.

You can specify one or more name/value pairs. When you leave the field blank, SAS Publisher ignores the option.

For more information about specifying name/value pairs in the How To Publish tab, see Specifying Package Format.

Using the Publish Package Interface to Specify Name/Value Pairs for a Package Item

When creating a package entry, you assign name/value pairs to the nameValue property in the INSERT_entry-type SAS CALL routine, where values for entry-type are as follows:

The following code shows the assignment of name/value pairs to a data set package entry.

   libname = "HR";
   memname = "capacityHistory";
   description = "Flight Capacity History (Data)";
   nameValue = "type=dataset hub=RDU";
   call insert_dataset(pid, libname, memname, 
      description, nameValue, rc);

This nameValue property specifies a data set whose data is relevant only to the RDU hub.

For complete details about programmatically specifying name/value pairs, see PACKAGE_BEGIN CALL routine syntax.

Specifying Name/Value Pairs for an Entire Package

Here is an example of specifying a single name/value pair for an entire package:

   market=US

The publisher identifies the entire package as relevant only to a US market.

To describe the contents of an entire package with finer granularity, the publisher can specify multiple name/value pairs. A space separates each name/value pair. Here is another example of specifying multiple name/value pairs for an entire package:

   market=US type=report content=ticketsales 
      Quarter4 priority=high

This high-priority package contains one or more reports about fourth-quarter ticket sales that is relevant only to a US market.

When both subscribers and developers of package-retrieval applications know about package name/value pairs, they can construct and apply filters that control package delivery.

The publisher can specify name/value pairs when publishing the package using these methods:

Using SAS Publisher to Specify Name/Value Pairs for Entire Packages

For the archive, message queue, and SAS channel subscriber delivery types only, you can specify one or more name/value pairs in the optional Package Name/Value group box in the How to Publish tab. For example, you could specify

   market=US type=report content=ticketsales 
      Quarter4 priority=high

This high-priority package contains one or more reports about fourth-quarter ticket sales that are relevant only to a US market.

You can specify one or more name/value pairs. When you leave the field blank, SAS Publisher ignores the option.

For more information about specifying name/value pairs in the How to Publish tab, see Specifying Package Format.

Using the Publish Package Interface to Specify Name/Value Pairs for an Entire Package

For the archive, message queue, and SAS channel subscriber delivery types only, you assign name/value pairs to the nameValue property in the PACKAGE_BEGIN CALL routine.

The following code shows the assignment of name/value pairs to an entire package:

   packageID=0;
   rc=0;
   desc = "Nightly run.";
   nameValue = "market=US type=report content=ticketsales 
      Quarter4 priority=high";
   CALL PACKAGE_BEGIN(packageId, desc, nameValue, rc);

This nameValue property specifies a high-priority package that contains one or more reports about fourth-quarter ticket sales that are relevant only to a US market.

For complete details about programmatically specifying name/value pairs for an entire package, see PACKAGE_BEGIN CALL routine syntax.