Multiple comparisons


FILTer or MATCH might be specified more than once on any given SMF or EVENT statement (although, as noted previously, FILTer and MATCH are mutually exclusive and might not both be specified on any single statement).

Multiple comparisons might be grouped as multiple operands of a single FILTer or MATCH parameter. The relationship among the comparisons is a Boolean AND. To select only events with an ACF2-detected error for data sets whose names began with SYS1. you can code:

SMF ACF2 MATCH( ACSMFERR(GT 0) A$SSPDSN(EQ 'SYS1.**') ) ...

You can FILTer (filter out) or MATCH (select) on multiple criteria by specifying FILTer or MATCH more than once. The relationship among multiple FILTer or MATCH parameters on a single EVENT or SMF statement is a Boolean OR. That is, an event that matches the criteria of any one (or more) FILTer or MATCH parameters can be filtered out or selected for formatting and forwarding.

Examples
  • You could select SMF 30 records only for jobs whose name began with DEV or PRG by coding:SMF 30 MATCH(SMF30JBN(= 'DEV*')) MATCH(SMF30JBN(= 'PRG*')) ...

  • To extend the previous ACF2 MATCH to include data sets whose names began with either SYS1. or PROD. you can code:SMF ACF2 MATCH( ACSMFERR(GT 0) A$SSPDSN(EQ 'SYS1.**') ) +
             MATCH( ACSMFERR(GT 0) A$SSPDSN(EQ 'PROD.**') ) ...

Quick reference

FILTer or MATCH as Coded

In order for the event’s FILTer or MATCH to evaluate true

FILTer|MATCH( fieldname(…) fieldname(…) )

All of the logical tests of the FILTer or MATCH must evaluate true.

FILTer|MATCH(…) FILTer|MATCH(…)

At least one FILTer or MATCH must evaluate true.

ALLOF

Effects a Boolean AND. In order for ALLOF to evaluate true, all of the logical tests coded as operands of ALLOF must evaluate true.

ANYOF

Effects a Boolean OR. In order for ANYOF to evaluate true, any one or more of the logical tests coded as operands of ANYOF must evaluate true.

Example

The following two statements are equivalent.

SMF ACF2 MATCH( ACSMFERR(GT 0) A$SSPDSN(EQ 'SYS1.**') ) +
         MATCH( ACSMFERR(GT 0) A$SSPDSN(EQ 'PROD.**') ) ...
SMF ACF2 MATCH( ACSMFERR(GT 0) +
                ANYOF(A$SSPDSN(EQ 'SYS1.**') +
                A$SSPDSN(EQ 'PROD.**')) ) ...

ONEOF

Effects a Boolean Exclusive OR. You must code exactly two filter operands with ONEOF. In order for ONEOF to evaluate true, exactly one of the two operands must evaluate true.

ALLOF(), and ANYOF() and ONEOF() might be nested to any desired depth.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*