In access rules, the data set name (dsn) operand describes the data that the rule applies to. For example, the dsn can describe a minidisk, a CMS file, an OS/390 or VSE data set, an attachable DASD device, or a tape volume volser.
To make it easier to write access rules, CA ACF2 for VM lets you specify dsn values as masks. This is especially helpful when you need to write a large number of rules for similar minidisks and CMS files. Data set name masking characters include asterisks and dashes that you can combine in a single mask.
Asterisks are positional masking characters. You can substitute any character, including a blank, on a one‑to‑one basis for each asterisk in a mask.
|
Mask |
Matches |
|---|---|
|
V0191.WORK**.DATA |
V0191.WORK11.DATA |
If one or more asterisks are the last characters in a level, they also can match a null. This is the only case where asterisks match a null.
|
Mask |
Matches |
Does Not Match |
|---|---|---|
|
V0191.WORK** |
V0191.WORK11 |
V0191.WORK111 |
Here, the filename mask WORK** must include the characters WORK and, optionally, any other two characters. The filename cannot be more than eight characters.
If one or more asterisks are the first characters in a level or are imbedded between characters, they cannot match a null, as shown below:
|
Mask |
Matches |
Does Not Match |
|---|---|---|
|
*FILE.DATA |
TFILE.DATA |
FILE.DATA |
|
FILE.DA*A |
FILE.DATA |
FILE.DAA |
The mask *FILE.DATA indicates that immediately before the “F” in a filename beginning with FILE, there must be only one other character. The mask FILE.DA*A indicates that between the two “A”s in DA*A, there must be only one other character. In these cases, an asterisk does not match a null.
Use a dash after one or more characters in a device address, filename, or filetype to indicate that the remainder of the level is treated as if it were padded with asterisks for its full length (a maximum of eight characters).
|
Mask |
Matches |
|---|---|
|
V091.WORK-.DATA |
V0191.WORK.DATA |
The filename must begin with WORK and can continue with any other characters, including blanks, up to a total of eight positions.
Besides padding out one or more characters at the end of a level, a dash also pads out an entire level in either direction. If the dash is not between two periods (.), it can pad out more than one level.
|
Mask |
Matches |
|---|---|
|
V0191.- |
V0191.FILE1.LIST |
Using a dash is even more flexible in representing OS/390 data set names that can contain many levels:
|
Mask |
Matches |
|---|---|
|
WORK.DATA.- |
WORK.DATA |
|
WORK-.LISTING |
WORK.LISTING |
|
-.LISTING |
LISTING |
One point to remember about a dash is that it is only treated as a masking character when it is at the end of a dsn level (V019-) or when it represents one or more entire levels (V0191.). If a dash is imbedded between characters in a level (FIL-1) or if it appears at the beginning of characters in a level (-FILE1), it is considered to be a literal dash and not a masking character.
You can combine asterisks and dashes in a file mask.
|
Mask |
Matches |
Does Not Match |
|---|---|---|
|
V0191.*-.**** |
V0191.OLD.DATA |
V0191 |
This mask requires a device address of V0191, a filename of at least one character, and a filetype of any four characters (with blanks or trailing nulls valid).
|
Copyright © 2009 CA Technologies.
All rights reserved.
|
|