Filter predicate
A filter predicate defines one condition that Log Master uses to select log records.
You can combine a filter predicate with additional filter predicates to form a Search condition definition. For more information, see LOGSCAN search condition definition.
The following figure shows the filter predicate syntax used in the WHERE clause of the LOGSCAN statement.
Option | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Selectable field definition | Specifies the field of a log record that Log Master compares against the value variable to select log records during the log scan. For more information about the fields that you can select, see Selectable field definition. For more information about abbreviating items, see Synonyms. | ||||||||||||||||||||||||||||||||||||||||
operator | Defines the operator that Log Master uses to compare a selectable field against a specified value. Match the type of the operator to the type of the field that you select. The available operators are as follows: Numeric operators in filters
| ||||||||||||||||||||||||||||||||||||||||
value | For each log record, Log Master compares the value of the selectable field against the constant entered as value to determine whether to select the log record. For more information about the selectable field, see Selectable field definition. For value, you can enter
For each filter predicate, match the type of the constant in value to the type of the selectable field. As you enter constant values, be aware of the following points:
Log Master distinguishes between hexadecimal numeric constants and hexadecimal representation of Unicode characters based on the data type of the selectable field. | ||||||||||||||||||||||||||||||||||||||||
PART nnnn | Selects log records that reflect activity in a given partition of a table space. The nnnn represents the partition number within the table space. To use this keyword, the following conditions must be true:
For example, to select only the log records in one partition, use a search condition such as You can also use the PART keyword as you define a set of multiple table spaces (using the IN or NOT IN keywords). | ||||||||||||||||||||||||||||||||||||||||
LIKE stringPattern | Log Master can compare a string item (for example, a table name or the content of a column) against a string pattern to determine whether to select log records during the log scan. This operation is similar to the LIKE predicate in SQL syntax. If the string item meets the requirements specified by the string pattern, Log Master selects the log record. To specify a string pattern for selecting log records, use the wildcard characters listed in the following table. The characters can be included at the beginning of, in the middle of, or at the end of the string pattern. You can include more than one occurrence or more than one type of wildcard character in the string pattern. Wildcard characters for string comparisons
The following examples illustrate some common uses of wildcard characters in a string pattern:
| ||||||||||||||||||||||||||||||||||||||||
IN (value, value) | Log Master can compare data from log records against a single value or a set of values separated by commas. The IN keyword indicates a set of multiple values. | ||||||||||||||||||||||||||||||||||||||||
NOT | Specifies that log records are selected when the value of a field does not meet the requirements that you specify. This keyword can select log records when
| ||||||||||||||||||||||||||||||||||||||||
owner.tableName.columnName CHANGED | NULL | Selects log records based on the content of a specific column in a specific table. The CHANGED keyword enables you to select log records if the content of the column is changed in any way. The NULL keyword enables you to select log records if the content of the column is a null value. Log Master can also compare the value in a specific table and column against a constant value or a set of constant values. For more information, see owner.tableName.columnName. To fully qualify a specific column in a specific table, enter the user ID of the owner of the table. If you do not specify a value, Log Master uses a default value. The default value of owner is the user ID of the batch job that runs Log Master. Do not confuse this type of filter predicate with the Column include/exclude definition that selects table columns in certain types of output. The differences are as follows:
| ||||||||||||||||||||||||||||||||||||||||
UPDATE TYPE | Selects log records based on what type of action was performed on a table row (the update type). The valid values are INSERT, UPDATE, DELETE, and EXCHANGE. | ||||||||||||||||||||||||||||||||||||||||
IN (INSERT | UPDATE | DELETE | EXCHANGE) | Log Master can compare the update type of log records against a single update type or a set of update types separated by commas. The IN keyword indicates a set of multiple update types. The valid update types are INSERT, UPDATE, DELETE, and EXCHANGE. | ||||||||||||||||||||||||||||||||||||||||
Catalog activity definition | Selects log records based on the type of Db2 catalog activity that they reflect (what type of data definition language (DDL) statement resulted in the log record). Use the Catalog activity definition when you are generating a DDL output file; it is not valid if your job specifies any other type of output. For more information about the types of Db2 catalog activity that you can select, see Catalog activity definition. | ||||||||||||||||||||||||||||||||||||||||
Catalog object definition | Selects log records based on the type of Db2 catalog object that the log record relates to (for example, records relating to indexes or records relating to views). Use the Catalog object definition when you are generating a DDL output file; it is not valid if your job specifies any other type of output. For more information about the types of Db2 catalog objects that you can select, see Catalog object definition. | ||||||||||||||||||||||||||||||||||||||||
Db2 command definition | Selects log records based on the Db2 command that the log record relates to (for example, records relating to a TRACE). The Db2 Command definition is not valid if your job specifies any other type of output. For more information about the Db2 commands that you can select, see Db2 command definition. |
Comments
Log in or register to comment.