SAS 9.1.3 Integration Technologies » Developer's Guide


SAS Subscription Manager
Overview
Requirements
Logging On
Subscription Manager Interface
Channels
Subscribing
Unsubscribing
Viewing Details
Searching
Subscriptions
Viewing
Viewing Details
Defining Default Properties
Defining Unique Properties
Restoring Default Properties
Groups
Viewing
Prev | Next | Contents
Publishing Framework

Name/Value Filters

Publishers can specify name/value pairs that describe the package that is being published. Knowledge of name/value pairs lets subscribers filter the packages that they receive. Publishers are responsible for providing accurate name/value pairs for the information that they publish.

You can define a name/value pair as either a name or a relationship between a name and a value in the form:

name < operator value >

where

Name is a variable to which you might assign a value. Name is not case-sensitive.

Operator relates the variable to the value. Commonly used operators are the comparison operators and the logical operators, which follow:

Comparison             Logical

=  equals               & AND
!= not equal            | OR
? contains

Value in the form of a string or a numeric value is appropriately assigned to the variable. Value is case-sensitive.

The following is an example of a package description using name/value pairs that a publisher has assigned to a published package:

   market=(Mexico, US) type=report Quarter4 sales _priority_=low

Knowing the conventions that a publisher uses to describe packages helps subscribers to write meaningful filters. The following examples illustrate filter strings that determine whether the preceding example entity would be selected by the filter. If the package meets the filter conditions, the package is delivered to the subscriber.

market=(US, Asia, Europe)
NO MATCH. Because the equals comparison operator (=) is used, the subscriber values and the publisher values that are assigned to the variable name MARKET must match exactly. In this example, the subscriber filters for US, Asia, and Europe, whereas the publisher assigns a value of Mexico and US. The conditions for selection are not met. Therefore, the package is not delivered to the subscriber.

market=(mexico, us)
NO MATCH. Because the equals comparison operator (=) is used, the subscriber values and the publisher values that are assigned to the variable name MARKET must match exactly. In this example, the subscriber values do not match the publisher values because of case differences. Therefore, the package is not delivered to the subscriber.

market=US | market=Asia | market=Mexico
NO MATCH. Because the equals comparison operator (=) is used, the subscriber values and the publisher values that are assigned to the variable name MARKET must match exactly. In this example, although the OR operator (|) might seem to cause a matching condition, the equals operator (=) requires that each name/value pair that is separated by an OR operator (|) match the publisher name/value pair entirely. A match would result if the subscriber values were written as follows:

market=Mexico, US | market=Asia | market=Mexico

The first name/value pair in the series would match. Therefore, the package would be delivered to the subscriber.

market=(Mexico, US)
MATCH. Because the equals comparison operator (=) is used, the subscriber values and the publisher values that are assigned to the variable name MARKET must match exactly. In this example, the value set does match. Therefore, the package is delivered to the subscriber.

market=(US, Mexico)
MATCH. Because the equals comparison operator (=) is used, the subscriber values and the publisher values that are assigned to the variable name MARKET must match exactly. In this example, the value set matches, regardless of the order of values within the value set. Therefore, the package is delivered to the subscriber.

market?US & market?Asia & market?Mexico
NO MATCH. The conditions that are specified in the subscriber name/value pair read: Variable name MARKET must contain the values US and Asia and Mexico. The contains comparison operator (?) identifies the eligible values for consideration. In this example, although the publisher variable MARKET contains US and Mexico, it does not also contain Asia. Because the logical AND operator (&) is used, its condition is not satisfied. Therefore, the package is not delivered to the subscriber.

market?US | market?Asia | market?Mexico
MATCH. The conditions that are specified in the subscriber name/value pair read: Variable name MARKET must contain the values US or Asia or Mexico. The contains comparison operator (?) identifies the eligible values for consideration. In this example, the publisher variable MARKET contains US, and the logical OR operator (|) condition is satisfied. Therefore, the package is delivered to the subscriber.

Quarter4=sales
NO MATCH. Because the equals comparison operator (=) is used, the subscriber values and the publisher values that are assigned to the variable name QUARTER4 must match exactly. In this example, because the publisher variable name QUARTER4 does not contain a value and the subscriber variable name QUARTER4 does contain a value of sales, the value sets do not match. Therefore, the package is not delivered to the subscriber.

Quarter4
MATCH. Variable names are not required to have values. In this example, because the publisher variable name QUARTER4 does not have an assigned value and the subscriber variable name QUARTER4 does not have an assigned value, the value sets match. Therefore, the package is delivered to the subscriber.

type=report & forecast
NO MATCH. Two conditions must be met. The equals comparison operator (=) requires that the subscriber values and the publisher values that are assigned to variable name TYPE match. In this example, the first condition is met because both the publisher and the subscriber assign the value report to variable TYPE. However, the AND logical operator (&) requires that the variable name TYPE also be assigned the value forecast. Because the publisher variable name TYPE is not assigned a value of forecast, the final condition is not met. Therefore, the package is not delivered to the subscriber.

type=report & sales
MATCH. Two conditions must be met. The equals comparison operator (=) requires that the subscriber value and the publisher value that are assigned to variable name TYPE match. In this example, the values match. Both assign the value report to the variable name TYPE. The AND logical operator (&) also requires that the variable name SALES match. Because both the publisher and the subscriber identify a variable name sales with no assigned value, the final condition is also met. Therefore, the package is delivered to the subscriber.

Adding Name/Value Filters

To add a name/value filter, type the filter string into the NameValue field and click Enter.

Removing Name/Value Filters

To remove a name/value filter, select the entry and press the Delete key.

Editing Name/Value Filters

To edit a name/value filter, select the entry, change it, and click Enter.