Using the filter line
On the filter line, the asterisk (*) under a column heading marks an area where you can enter a filter pattern to limit the data displayed. You can specify filter patterns for more than one column if necessary.
For alphanumeric columns, the asterisk is displayed in the leftmost position. For numeric columns, the asterisk is displayed in the rightmost position.
- An asterisk (*) on its own to match all values, or
- A filter pattern using wildcard characters to select only those objects that match the pattern.
- asterisk (*)
- Represents a string of zero or more characters. Acts the same as a percent sign (%).
- percent sign (%)
- Represents a string of zero or more characters. Acts the same as an asterisk (*).
- underscore (_)
- Represents any single character, excluding a trailing blank.
For alphanumeric columns, FM/Db2 matches the filter pattern you enter with the leading characters of the contents of the column for each row. That is, the filter pattern DEF matches ‘DEF’ and ‘DEFG’, but not ‘CDEF’.
For numeric columns, FM/Db2 matches the filter pattern you enter with the value of the contents of the column for each row. That is, the search argument 7 matches columns containing 7 but not, for example, 70 or 17.
The following examples show how you can use filter patterns to limit the data FM/Db2 displays. (In the examples shown, it is assumed no operator has been specified in the corresponding area on the operator line.)
- Pattern filter
- Selects objects where column contains…
- *
- Any alphanumeric string
- ABC*
- Any alphanumeric string starting with
ABC
- *ABC*
- Any alphanumeric string containing the string
ABC
- A__C
- Any four-character alphanumeric string where the first character
is
A
and the last character isC
- %BC_
- Any alphanumeric string containing the string
BC
followed by one more character - 123
- For numeric columns: the value 123
- 23
- For numeric columns: the value 23