The FILTLIST statement is a definition list that you can use when
testing variables in an ACS routine. You define the information that
you want to include and exclude in the list using the INCLUDE and
EXCLUDE keywords. Then you can compare read-only variables to items
in the list using IF-THEN and SELECT-WHEN statements, without having
to write elaborate AND and OR combinations.
FILTLIST is a definition statement that simplifies comparison operations.
It is not an execution statement, and it does not change the value
of any variables.
Because a FILTLIST can contain only literal values, you can only
compare it to literal read-only variables. This excludes the numerically
valued &NQUAL, &NVOL, &SIZE, &MAXSIZE, &MEMNQUAL,
and &RETPD read-only variables from FILTLIST comparisons.
You must define a FILTLIST before you reference it in the body
of an ACS routine.
FILTLIST name [<INCLUDE(
list)>] [<EXCLUDE(
list)>]
- name is mandatory and can be up to 31
alphanumeric characters in length. You can also use an underscore, _,
but it cannot be the first character. In the FILTLIST, you can optionally
precede the name with an ampersand, & When referring to the FILTLIST
in the body of the routine, you must always precede the FILTLIST name
with an ampersand.
- You must specify INCLUDE, EXCLUDE, or both in the FILTLIST statement.
If a list item satisfies both the INCLUDE and EXCLUDE criteria, EXCLUDE
takes precedence and prevents the item from being included in the
list.
- list can contain literals, simple masks,
and data set masks. You can specify up to 255 entries in the INCLUDE
or EXCLUDE lists.
Figure 1 shows an example of coding a FILTLIST
statement:
Figure 1. Example of a FILTLIST
StatementPROC STORCLAS
FILTLIST VLIST2 INCLUDE(DBX*, TSO*) EXCLUDE('DBX191', 'TSO256')
IF &ALLVOL = &VLIST2 THEN
(some action)
END
Figure 2. Using the INCLUDE and
EXCLUDE
In the environment shown in
Figure 2, the value of the
IF statement is
true for any of the following
volume serials:
- TSO191
- TSO002
- DBX256
- DBXRES
The value of the IF statement is
false for
the following volume serials, because they match the EXCLUDE filter
criteria: