A filter contains criteria
for subsetting data. For example, a filter named Males could be defined
in an information map as
gender="Male"
.
An information map can
contain filters that are not supported by the Information Maps engine.
Only filters that are defined using static values (called unprompted
filters) can be used in a FILTER= data set option. You can use the
CONTENTS procedure to print a list of the filters that are supported
by a libref that is created by the Information Maps engine.
Using the FILTER= data
set option is similar to using a WHERE clause in a PROC SQL statement.
However, filter criteria are applied as data is retrieved from the
data source. As a result, a FILTER= option restricts the amount of
data that is returned from the data source. In contrast, a WHERE clause
is applied as data from the data source is brought into SAS. As a
result, a WHERE clause does not restrict the amount of data that is
retrieved.
When you specify more
than one filter in the FILTER= option, you must use Boolean operators
to define the logical relationships between the filters in the filter
clause. The rules of precedence for Boolean operators in filter clauses
follow the rules set for the SAS WHERE clause. These rules specify
that the NOT operator has the highest precedence, followed by the
AND and OR operators. You can use parentheses to specify explicit
precedence or groupings within the clause. For more information about
the rules for the SAS WHERE clause, see "Combining Expressions by
Using Logical Operators" in
SAS Language Reference: Concepts.