If VTAM® finds more than
one model application program definition that could match the name
of an application program requesting to open its ACB, it uses the
model definition whose name best matches the name of the application
program requesting to open its ACB. (Similarly, if VTAM finds more than one model CDRSC definition
that matches the name of a cross-domain resource it encounters, it
uses the model definition whose name best matches the name of the
cross-domain resource.) VTAM determines the best match following the rules for wildcard support
described in z/OS MVS Setting Up a Sysplex. This section provides an overview of these
rules (which apply to model CDRSCs, and to model applications).
VTAM compares a model application
program name with the name of the application program trying to open
its ACB. It compares each name, character for character, scanning
from left to right. For each character, VTAM looks for a match in the following order:
- Most specific match: The actual character (A–Z, 0–9, @, #, or
$)
- Next most specific match: A single-character wildcard character
(?)
- Least specific match: A multiple-character wildcard character
(*)
This order implies the following situation:
- The model application program name that contains no wildcard characters
will always be the most specific.
For example, if an application
program named ABCDEFG requests to open its ACB, VTAM will search VTAMLST for a definition of
ABCDEFG. If there is a definition statement named ABCDEFG, VTAM will use that statement as
the definition of ABCDEFG.
- The model application program name with the most actual characters
appearing before a wildcard character is more specific.
For example,
if an application program named ABCDEFG requests to open its ACB, VTAM will search VTAMLST for a
definition of ABCDEFG. If there is no definition statement named ABCDEFG,
but there are two model definitions named ABC?EFG and ABCD*, VTAM will use ABCD* as the definition
of ABCDEFG. As shown below, VTAM scans from left to right, looking first for character-to-character
matches, which it finds for the first three characters in ABC?EFG.
However, as it continues scanning, it finds that ABCD* has a character-to-character
match for the first four characters, which gives it priority over
ABC?EFG. Even though the question mark in ABC?EFG is in an earlier
position (fourth) than the asterisk in ABCD* (fifth), because ABCD*
matches ABCDEFG character-to-character for the first four positions,
and because VTAM searches first
for character-to-character matches, ABCD* is the more specific match.
A B C D E F G
| | |
A B C ? E F G
A B C D E F G
| | | |
A B C D *
Other examples are:
- ABC?DE
- is more specific than
- ABC*DE
- because the single-character wildcard character (?) is more specific
than the multiple-character wildcard character (*).
- ABC?DE
- is more specific than
- ABC??E
- because the actual character (D) is more specific than the single-character
wildcard character (?).
- ABC?DE
- is more specific than
- ABC?D*
- because the actual character (E) is more specific than the multiple-character
wildcard character (*).
Tip: Use the DISPLAY MODELS command with the APPL operand
to verify that the model definition that you intend to use for your
application name is the one that VTAM selects.