Using pattern masking
RMGR supports pattern masking in some ISPF interface fields (and in some batch keywords) that allow you to specify the name of an object, group, utility, or other record or the nodes of a data set. You can substitute masking (wildcard) characters for one or more characters in the name or node, allowing you to easily select all objects, groups, records, or data sets that match the masking pattern.
Rules for pattern masking
Wildcard characters take the place of one or more characters, depending on the character you choose and its position in the name or node.
The question mark character (?) can replace a single character in a name or node. The character cannot be a null.
The asterisk character (*) can replace multiple characters when placed at the end of a name or node. If the asterisk is the only character typed in a field, it matches all values. Any characters that follow the asterisk (within a single name or node) are ignored.
You can use question marks and an asterisk in the same name or node as long as the question marks come before the asterisk. If the name is a data set name, you can use wildcard characters within multiple nodes as if each node were a separate name.
Examples of pattern masking
The following table shows examples of pattern masking.
Desired results | Pattern | Example matches | Example mismatches |
---|---|---|---|
Show all four-character items that have 'egu' in positions 1 through 3. | egu? | egui eguo | eguid eguodbd dbd1egui egu |
Show all eight-character items that have 'egui' in positions 1 through 4, any characters in positions 5 through 7, and 'x' in position 8. | egui???x | eguidbdx eguiprdx | eguix eguodbdx eguidbd eguidbx |
Show all items that have 'egui' in positions 1 through 4. | egui* | eguidbd1 eguitdbd egui eguid | eguodbd dbd1egui egu |
Show all items that have 'eg' in positions 1 and 2, have any character in position 3, have 'idbd' in positions 4 through 7, and have any character (including no characters at all) in position 8. | eg?idbd* | eguidbd1 eguidbd egoidbdd | egidbd1 egxidb1 egui |
Show all items that have 'egui' in positions 1 through 4 (the characters after * are ignored). | egui*dbd | egui eguid eguiadbd eguidbd | eguo egu |
Show all items. | * | dbd1egui e egui eguidbd1 xegui | (none) |
Show all items (the characters after * are ignored). | *egui | (all) | (none) |
Show all data sets with 'bmcirm' in the first node, any combination of characters in the second node, 'dbd' in positions 1 through 3 of the third node, any character in position 4 of the third node, '01' in positions 5 and 6 of the third node, and any combination of characters in the fourth node and remaining nodes. | bmcirm.*. dbd?01.* | bmcirm.test. dbdt01. dsgt01 bmcirm.test. dbdt01. dsgt02 bmcirm.prod. dbdp01. dsgp01 | bmc.test. dbdt01. dsgt01 bmcirm.test. dbd01. dsg01 bmcirm.test. dbd |
Show all data sets with 'bmcirm' in the first node and any combination of characters in the remaining nodes. | bmcirm.* | bmcirm.test bmcirm.prod. dbd | bmc.test. dbdt01. dsgt01 irm.test |