Previous Topic: Character and Text StringsNext Topic: Using Quotes to Find Strings with Blanks


Wildcard Characters and Pattern Strings

Any field whose value consists of character or text data (data set names, volumes, messages, and so on) can be tested against patterns using the INCL and EXCL operators within a filter expression. CA Vantage SRM recognizes the following wildcard or pattern characters:

?

If this character is in the pattern, it matches any non‑blank character within a character string. For example, SYS?.LINKLIB matches both SYS1.LINKLIB and SYS2.LINKLIB. However, when ? is used for filtering on text strings, it means any character, including blanks within the text.

*

If this character is present in a dsname string, a single level node is not checked (for example, A.*.B.*.SOURCE). The asterisk can be placed after significant characters in a string node to indicate that any following characters in the node are acceptable (for example, A.B*.SOURCE).

Although this is the most common usage, technically the * character in the pattern means that any character in the string is valid until the next period or end of string is reached. Therefore, it may also be used with text strings to mean 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 that the definition of the * character in CA Vantage SRM differs from the IBM usage. In most cases where you would use a * character in IBM filter patterns, you should use the / character in CA Vantage SRM.

/

When this character is in the pattern, comparison to the input string terminates at the previous character. These are called prefix entries. If the prefix matches the input string up to the slash, the comparison is satisfied. For example, SYS/ matches all data sets whose names begin 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 CA Vantage SRM, the pattern DEPT751./ should be used.

!

When this character (English exclamation mark, hex 5A) is encountered, the input is searched for a match on the characters that follow it. The characters can occur anywhere in the input string. For example, the pattern !SOURCE matches any data set name that contains the SOURCE string anywhere in the name. The pattern !SOURCE! matches any data set that ends in the string SOURCE, regardless of what precedes that string.

Note: The ! character is often translated to another on various international keyboards. An easy way to find the correct national character for use with the View 3270 Client is to enter the filter window for any object, press F1 for Help, and then browse the section Wild Characters for Pattern Matching. It will display the proper character to use.