These functions let you compare the volume serial numbers explicitly specified on input with a comparison variable (for example, a FILTLIST variable). The use of &ALLVOL in a comparison expression returns a true value if ALL of the input volsers satisfy the desired condition. The use of &ANYVOL returns a true value if ANY of the input volsers satisfies the desired condition. For example, let IMS101, IMS102, and TSO191 be the input volsers to the routine in Figure 1:
PROC STORCLAS
IF &ALLVOL = IMS* THEN
(code left out)
SELECT
WHEN (&ANYVOL = TSO*)
(code left out)
END
END
The IF statement is false because not all volumes match. While IMS101 and IMS102 satisfy the IMS* mask, TSO191 does not.
The WHEN statement is true, because any (at least one) volume does match. While IMS101 and IMS102 fail to satisfy the TSO mask, TSO191 does satisfy the mask.
For a detailed explanation of the IF statement, refer to IF statement.