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:
- 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.
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.
- 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:
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:
To customize expert rules
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)
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:
Update the Explain options to identify this rule set.
- At the SQL Explorer main menu, select 0 (Options).
- At the Options panel, select 1 (General).
- At the General Default Options panel, press Enter.
- 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.
Related topics