Previous Topic: Filtering on Date FieldsNext Topic: Using Single Quotes


Wildcard Characters

Any field whose value consists of character data (data set names, volumes, RECFMs, and so on) can be tested against patterns using the INCL and EXCL operators.

The Windows Client recognizes the following wildcard characters:

?

The ? (question mark) character matches any non‑blank character within a character string. For example, SYS?.LINKLIN matches SYS1.LINKLIB and SYS2.LINKLIB.

Note: When you use ? to filter on text strings, it means any character, including blanks, within the text.

*

The * (asterisk) character acts as an inclusive wildcard; single level nodes are not checked (for example, A.*.B.*.SOURCE). Place the asterisk after characters in a string node to indicate that any following characters in the same node are acceptable (for example, A.B*.SOURCE).

Although this is the most common usage, the * character in the pattern means that any character in the string is valid until the next period or the end of the string is reached. You can also use an asterisk within a text string to indicate that anything is acceptable up to the next period within the text or, if no more periods are present, to the end of the text.

Note: The Windows Client definition of the * character differs from the IBM usage. In most cases where you would use a * character in IBM products you should use the / (forward slash) character in the Windows Client.

/

The / (forward slash) character specifies that comparison to the input string is to terminate at the previous character. These are called prefix entries. If the prefix matches the input string up to the forward slash, the comparison is satisfied. For example, SYS/ matches all data sets with names beginning with SYS, regardless of what follows.

This usage is similar to the way in which IBM products use the * character. For example, in IBM products, the pattern DEPT751.* finds all data sets with a first‑level index of DEPT751. To obtain the same result in the Windows Client, use the pattern DEPT751./.

!

The ! (English exclamation mark) character specifies that the input is to be searched for a match on the characters that follow it. The pattern characters can occur anywhere in the input string.

For example, the pattern !SYS1 matches all data set names that contain the SYS1 string anywhere in the name. The pattern !SYS1! matches all data sets that end in the string SYS1, regardless of what precedes that string.

Note: The ! character is often translated to various other characters on international keyboards. To find the correct national characters on the View 3270, enter the filter window for any object, press F1 for Help, then browse the Wild Characters for Pattern Matching section (z/OS systems only).