Limited supportBMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see BMC AMI Apptune for Db2 13.1.

Customizing expert rules


You can customize or create your own custom rule sets. Use this procedure to copy one of the default rule sets and modify its rules to meet your needs.

Consider the following when defining your own rules set:

  • The facts and variables within the predefined rules are set internally. You can use the same facts within rules that you define. 
  • You can modify the severity codes on messages by adjusting them to the severity level that you require.
  • If you do not want a rule to trigger, use one of the following methods to disable it:
    • Enclose rules that you do not want to fire within a comment statement. The syntax for a comment is  /* commentText */ .
    • Set the predicate comparison to A=0. For example, you could modify a rule as follows to ensure that it is never triggered:

      Example
      RULE1008: IF A = 0 THEN OUT=OUT||"BMC184008X-A Correlated Subquery will be e"|| "valuated for each row in the composite table. It performs like a N"|| "ested Loop Join./n"
    • Set the severity code of the message to X.
  • If you want a rule to always trigger, ensure that the predicate always evaluates to true.

    Example
    RULE1008: IF 0 = 0 THEN OUT=OUT||"BMC184008I-A Correlated Subquery will be e"|| "valuated for each row in the composite table. It performs like a N"|| "ested Loop Join./n"
  • If your message text is longer than a single line, ensure that you use the || characters to append the next line. Enclose each line in the message within quotation marks and end the message with /n.

    Example
    RULE5056: IF FULLOUTER = "Y" THEN OUT=OUT||"BMC184620I-The clause FULL OUTER JOIN incl"|| "udes unmatched rows from both tables. Missing values in the result"|| " table are filled with nulls./n"
  • You can use variable values within the message text:
    • If you want to display a variable value in the message, insert the variable name within || characters. Do not include the variable name within quotation marks. For example, the following message includes the variable value for LOCKSIZE on the final line:

      Example
      RULE2054P: IF LOCKRULE = "P" THEN LOCKSIZE = "PAGE" RULE2054R: IF LOCKRULE = "R" THEN LOCKSIZE = "ROW" RULE2054T: IF LOCKRULE = "T" THEN LOCKSIZE = "TABLE" RULE2054S: IF LOCKRULE = "S" THEN LOCKSIZE = "TABLESPACE" RULE2054L: IF LOCKRULE = "L" THEN LOCKSIZE = "LOB" RULE2054X: IF LOCKRULE = "X" THEN LOCKSIZE = "XML" RULE2054: IF LOCKRULE <> "A" THEN OUT=OUT||"BMC184224W-The tablespace has a LOCKSIZE t"|| "hat does not match your installation standard. The current LOCKSIZ"|| "E is "||LOCKSIZE||"./n"
    • If the value that you want to display is a numerical value, check to see if an equivalent string variable exists. The equivalent variable name has a C appended. For example, the following message includes the variable value for SEGSIZE on the final line:

      Example
      RULE2056: IF TBTYPE = "T" AND SEGSIZE > 2 THEN OUT=OUT||"BMC184226W-The tablespace has a SEGSIZE th"|| "at does not match your installation standard.The current SEGSIZE "|| "is "||SEGSIZEC||"./n"

To customize expert rules

  1. Copy one of the following members in the BMCSAMP data set to create your own version of the rule set:

    • PSSDFLT (for the DEFAULT rule set)
    • PSSAPPL (for the APPLDEV rule set)
    • PSSJAPAN (for the JAPAN rule set)

    Note

    Do not modify the sample members directly. These files will be overwritten and any changes lost the next time that you install the product. Always create a copy of the file and save it in the hlq.UBMCSAMP library.

  2. Modify the copy of the rule set in the  hlq.UBMCSAMP data set as needed.

    Ensure that the rules conform to the structure. Ensure also that the RULESET name matches the name of the new rules member, as does NEWRULE1 in the following example:

    Example
    BROWSE HLQ.LLQSAMP(NEWRULE1) - Command ===> ********************************* Top of Data **** RULESET NEWRULE1
  3. Update the Explain options to identify this rule set.

    1. At the SQL Explorer main menu, select 0 (Options).
    2. At the Options panel, select 1 (General).
    3. At the General Default Options panel, press Enter.
    4. At the Explain Options panel, specify the member name of the rule set that you want to use in the Rule set field and press Enter.

    Note

    For information on the other options that you can enter on the Explain Options panel, see Specifying Explain options Specifying Explain options.

    You can also access the Explain Options panel from the Explain Object Specification panel by selecting the Explain Options field.

 

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