Previous Topic: Filter Length LimitationNext Topic: Patterns


Syntax of Filter Expressions

Take note of the following filter expression syntax examples:

INCL and EXCL

Use the INCL and EXCL operators to compare character fields with test values that contain one or more pattern‑matching characters. For example, the following statement includes all data sets with names matching the DEPT751./ pattern:

Datasets INCL DEPT751./

By contrast, the following statement attempts to find data sets whose first‑level index is exactly DEPT751./. The filter does not attempt pattern matching. Instead it looks for a forward slash (/) in position nine of the data set name.

Since IBM does not allow the slash as part of the data set name on z/OS systems, the following statement returns no matches:

Datasets = DEPT751./
Exactly Equal

It is a common mistake to use DSNAMES = DEPT751./ The = operator means exactly equal or, in this case, data sets starting with DEPT751 and ending with ./ in bytes 8 and 9. This exactly equal comparison is usually not what users intended. To pattern match on the / sign, use the pattern include operator, INCL.