Pattern generality – HP NonStop G-Series User Manual

Page 89

Advertising
background image

Working with Patterns

Safeguard User’s Guide422089-009

9 -3

Pattern Generality

Not a legal pattern protection record because it has wildcards in the volume name.

$D0201.*

Not a legal pattern because there is only a subvolume component, and not a
diskfile component. However, when adding this pattern into Safecom, the current
subvolume will be taken from the environment. The pattern will be translated into a
legal pattern:

$D0201.subvol.*

.

$SYSTEM.SYS00.OSIMAGE

Not a legal pattern because it contains no wildcards.

SYS??.OSIMAGE

Not a legal pattern because it does not contain a volume component. However,
when adding this pattern into Safecom, the current volume will be taken from the
environment.

Pattern Generality

Given a pattern, the farther left a wildcard is in that pattern, the more general it is. Also,
the asterisk (*) is more general than the question mark (?).

HP uses that principal to decide which pattern to use when more than one pattern
describes a file; for example, $DATA1.A*.* is more general than $DATA1.A*.B*.

Consider these files:

1. $DATA1.APPLPROD.SERVER1

2. $DATA1.APPLTEST.SERVER1

3. $DATA1.APPLCNTL.STARTUP

4. $DATA1.APPLDEVL.BUILD

Files 1,2,3 and 4 all match pattern “$DATA1.A*.*”. However, file 4 is the only match for
pattern $DATA1.A*.B*.

Which pattern would be used for file 4?

1. $DATA1.A*.*

2. $DATA1.A*.B*

Since both patterns have the same first 10 characters “$DATA1.A*.”, only look at what
is left. “*” and “B*”. The wildcard in “B*” is further to the right, it is more specific and will
be the one chosen.

Consider these patterns:

1. $DATA1.APPL*.SERVER?

2. $DATA1.APPL????.SERVER?

Advertising
This manual is related to the following products: