FILTLIST statement

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)>] Figure 1 shows an example of coding a FILTLIST statement:
Figure 1. Example of a FILTLIST Statement
PROC STORCLAS

  FILTLIST VLIST2 INCLUDE(DBX*, TSO*) EXCLUDE('DBX191', 'TSO256')

  IF &ALLVOL = &VLIST2 THEN
      (some action)

END
Figure 2. Using the INCLUDE and EXCLUDE
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:
The value of the IF statement is false for the following volume serials, because they match the EXCLUDE filter criteria: