FOR and IF statements

Certain BMC AMI Defender parameter statements support an optional second and third parameter of FOR and IF. The two parameters are similar in function: both specify circumstances under which the statement should not be processed.

FOR specifies that the statement should be processed only if BMC AMI Defender is running on one of the systems named; in other words, the statement should not be processed if the BMC AMI Defender LPAR is not named.

IF specifies that the statement should be processed only if at least one of the software switches named in the parameter is set to On. Switches are set On by the START parameter SWITch(ON()) and are set on or off by the statement SWITch. See SWITCH='switch,...' under the START command.

FOR(smfid …)

Specifies the LPAR or LPARs (by their SMF IDs) to that the statement applies. If you omit FOR (and IF), the statement is used for any LPAR. BMC AMI Defender ignores statements specifying a FOR parameter that does not include the SMF ID of the machine on that the program is running. SMF IDs are always upper case, but might be specified in upper, lower or mixed case. For instance, if you want to process DB2 events only on system SYSB you could code

SELECT  FOR(SYSB)  SMF(DB2)

IF

Specifies that this statement is to be processed only if at least one of the specified switches is set On or set Off, as indicated. If you omit IF (and FOR), the statement is used unconditionally. zDefender ignores statements specifying an IF parameter that does not include any switches that are set to On; or negated and undefined or set to Off. See SWITCH='switch,...' under the START command and SWITch statement.

switch
-switch

You might prefix a switch name with (-) (a minus sign or hyphen) to indicate negation; a negated switch satisfies the IF if it is undefined or set Off. If the switch was not previously initialized by a START parameter or a SWITch statement, it is undefined and treated as though Off. Switch names might be of any length and are not case-sensitive: MYSWITCH, myswitch and MySwitch are equivalent. For instance, if you want to %INCLUDE member CZDRMF if and only if the switch RMF were set, you could code

%INCLUDE  IF(RMF)  CZDRMF

Multiple FOR and IF statements

If you code both a FOR and an IF parameter (in either order) on a single statement, then both must be satisfied in order for the statement to be processed. 

Example

If you were to code,

SELECT IF(RMF) FOR(SYSB) SMF(70)

Then in order for SMF 70 events to be processed both the RMF switch must be on, and BMC AMI Defender must be running on SYSB.

If you code more than one FOR parameter on a single statement, then all must be satisfied in order for BMC AMI Defender to process the statement. The use of more than one FOR parameter on a single statement is not recommended.

If you code more than one IF parameter on a single statement, then all must be satisfied in order for BMC AMI Defender to process the statement.

Example

If you were to code,

SELECT IF(Scty SMF80) IF(Test Sandbox) SMF(80)

Then SMF 80 events is processed if and only if at least one of Scty and SMF80, and at least one of Test and Sandbox, were on.

Was this page helpful? Yes No Submitting... Thank you

Comments