Safeguard User's Guide (G06.24+, H06.03+)

Working with Patterns
Safeguard User’s Guide422089-009
9-4
One-Dimensional Search
Both of these patterns match files 1 and 2. However, only one protection record can be
used to protect these files. The more specific pattern is used, which in this case is
pattern 2, because the APPL? is more specific than the APPL*.
One-Dimensional Search
A one-dimensional search is a search using the volume only, the subvolume only, or
the filename only. A multi-dimensional search is one in which any two or three
dimensions are searched. Since patterns contain wildcards as part of their name, they
do not represent a specific file. Patterns are metadata. When a wildcard is encountered
in a pattern, the intent of the command has to be distinguished between using that
wildcard as part of the pattern and using the wildcard as a search character. Since a
pattern cannot have a wildcard in the volume name, when a wildcard is encountered in
the volume name a one-dimensional search is implied. When you use SAFECOM or
SPI to find protection records that have already been added, searches are used with
the other commands. When you use the INFO DISKFILE-PATTERN command,
wildcards can be interpreted as either pattern characters, or search characters. The
application of these wildcards depends on the context of the wildcard, and whether or
not the ALL option is used.
Consider the command INFO DISKFILE-PATTERN $DATA*.PROD?.DB*. Safeguard
treats the volume wildcard as a search character, and the wildcards in the subvolume
and filename as pattern characters. Safeguard will search each volume that matches
$DATA* for the specific pattern PROD?.DB*. This search is referred to as a one-
dimensional search. At most, one pattern per volume would be returned.
Multi-Dimensional Search
Using the command modifier ALL implies that a multi-dimensional search is requested.
It is possible for more than one pattern per volume to be returned. Multi-dimensional
searching of patterns can present a problem. How do you indicate which wildcards in
“$DATA*.B*.C*” are meant to be used to search for patterns that contain a wildcard?
For example, if it is desired to list all patterns that start with the letter C in the filename;
for example “C*”, how would the user tell Safeguard that “C*” is a search string and not
part of the pattern? The G06.25 release implements a simple command attribute “ALL”,
that tells Safeguard that all of the wildcards in the pattern are to be treated as search
characters.
For example, “INFO DISKFILE-PATTERN $DATA*.B*.C*,ALL” tells Safeguard to look
for all patterns that match “B*.C*” on all volumes that match “$DATA*”. This is a multi-
dimensional search, because it is searching multiple volumes, and looking on each
volume for multiple patterns that match "B*.C*". On the other hand, "INFO DISKFILE-
PATTERN $DATA*.B*.C*" tells Safeguard to look for the pattern "B*.C*" on all volumes
that match "$DATA*". This is a one-dimensional search.
Consider the command INFO DISKFILE-PATTERN $DATA*.PROD?.DB*, ALL. The
presence of the command modifier ALL tells Safeguard that all the wildcards are to be
treated as search characters. Safeguard will search each volume that matches $DATA*
for all patterns that can be described by PROD?.DB*.