Specifying Name/Value Pairs

Overview of 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, SAS channel subscribers can use the Publishing Framework plug-in for SAS Management Console to construct filters. For determining what packages get delivered to them in their entirety, see Filtering Packages and Package Entries. 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 a package item or for an entire package 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 Publish Package Interface. 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(packageId, 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. See Filtering Packages and Package Entries.
The publisher can specify name/value pairs when publishing the package by using the Publish Package Interface. 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.