Previous Topic: Access Rule MaskingNext Topic: Resetting the Character Delete Definition


Masking the DSN Value

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

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
V0191.WORK22.DATA
V0191.WORK33.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.WORK1
V0191.WORK

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
XFILE.DATA

FILE.DATA
OLDFILE.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.

Dashes

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
V0191.WORK1.DATA
V0191.WORK11.DATA
V0191.WORK111.DATA
V0191.WORK1111.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.-
V0191.FILE1.L-
V0191.-.LIST
-.V0191.-
-.FILE1.-
-.LIST

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.DATA.TEST
WORK.DATA.TEST.LISTING

WORK-.LISTING

WORK.LISTING
WORK.DATA.LISTING
WORK.TEST.LISTING
WORK.DATA.TEST.LISTING

-.LISTING

LISTING
TEST.LISTING
DATA.TEST.LISTING
WORK.DATA.TEST.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.

Combination Asterisk and Dash

You can combine asterisks and dashes in a file mask.

Mask

Matches

Does Not Match

V0191.*-.****

V0191.OLD.DATA
V0191.WORK.TEXT
V0191.SHOW.EXEC

V0191
V0191.MAP
V0191.WORK.ASM

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).