Technical data

Using Files and Directories
10.7 Accessing Tape Files
10.7.3 Using Wildcard Characters with Tape Volumes
The OpenVMS operating system supports a limited use of wildcard characters in
file specifications for tape volumes.
Table 10–6 explains the use of wildcard characters with OpenVMS extended
names and with standard names.
Table 106 Wildcard Character Support with Tape Volumes
Wildcard
Character
OpenVMS
Extended
Names
Standard
Names Description
Asterisk (*) X X In OpenVMS extended names, you can use an asterisk
anywhere in the file name and file type field to match a
field or portion of a field. You can also use the asterisk in the
version number field.
In standard names, you can use only a single asterisk in a
field.
Percent sign (%) X In OpenVMS extended names, you can use a percent sign in
a file specification only to match character positions within a
field. You cannot use the percent sign in the version number
field.
Unlike OpenVMS extended names, which can consist of up to 39 characters
each for the file name and file type, standard names can have a maximum of 17
characters.
The following examples show how to use wildcard characters in file specifications
to search for files on tape volumes. These examples also show how you can use
the DIRECTORY command with tapes. Note that the DIRECTORY command
does not work the same with tape files as with disk files.
Examples
1.
$ DIRECTORY MFA1:*.*;*
This command instructs the system to search a volume set. Because asterisks
are used in the file specification and the asterisk is a valid wildcard character
for both standard and OpenVMS extended names, the system returns both
OpenVMS extended names and standard names. Note that the system
returns tape file names within quotation marks.
2.
$ DIRECTORY MTA1:%*.*;*
$ DIRECTORY MTA0:*.%*;*
In these two commands, the search can match only with OpenVMS extended
names because the percent sign is not valid for standard names. In the
second command, the file type field must contain at least one character. Files
with no file type are not returned.
3.
$ DIRECTORY MTA0:*.;*
Using Files and Directories 1025