Adding filter lines

Filter lines consist of a column name, an operator, and a column value.

About this task

When filtering data for display, Db2® Query Monitor:

  • Examines the contents of the column that is identified in the filter's Column Name field.
  • Compares the content of the column to the value specified in the Column Value field by using the specified operator (for example, EQ, GE, GT, LE, LT, NE).
  • When a match occurs, filters the data according to the value specified in the Exclude Filter Data field on the Active Filters panel.
    • If Y is specified, data is excluded from display when a match occurs.
    • If N is specified, data is not excluded from display when a match occurs; instead, data that does not produce a match is excluded from display.

Procedure

  1. Issue the FILTER command from a panel or subpanel that supports filtering.
  2. Type CREATE on the command line and press Enter.
    The Create Filter Line panel is displayed.
    Figure 1. Create Filter Line panel
    --------------------------- Create Filter Line -------------------------- 
    Option  ===> _____________________________________________________________
                                                                              
      Column Name   ________   (PLAN,PROGRAM,CURSOR,COLLID,CONNNAME,CORRNAME, 
                                CORRID,AUTHID,JOBNAME,SSID,WSUSER,WSNAME,     
                                WSTRAN,DBNAME,OBJNAME,CREATOR,BUFPOOL,        
                                OBJTYPE,SECTION,PAGESET,TABNAME,WORKLOAD,
                                REQSITE,SPCREATR,SPNAME,EXCEPTNS,ALERTS)              
      Operator      EQ         (EQ,GE,GT,LE,LT,NE)                            
      Column Value  __________________________________________________________
      _________________________________________________________________
    Column Name
    The name of the column the filter examines when looking for a match.
    Note: Only Column Name types that affect the display in the current panel or subpanel are applied.
    Column Value
    The value on which to base the match for the filter line.
    Note: The case of Column values is handled according to the Mixed Case and Match Case settings previously described. Column values can also be specified using special wildcard characters.
    • The percent sign (%) is a fill character and it will match any value in that position. For example, a Column Value of ab%d will match abcd.
    • The asterisk(*) matches any number of characters beyond the minimum required. For example, abc* will match abcd, abcde, abcdef, etc.

      If you specify a column name of BUFPOOL, the column value B* is invalid, BP* must instead be used with the asterisk.

    There is also a special wildcard, N/A. This value can be specified in any case regardless of the setting of Mixed Case. During data capture, some data might be unspecified or unavailable. These fields show as N/A or blank on a display. You can filter these lines using the column value of N/A.

    Only the EQ and NE operators can be used with column values that include wildcard characters (* or %) or are set to N/A.

    For the EXCEPTNS and ALERTS columns, manual values are not supported; any entered value is ignored. Press Enter to open a selection panel and select one or more values.

    Operator
    The operator used when matching column values and column names.
    Valid values are:
    • EQ (equal to)
    • GE (greater than or equal to)
    • GT (greater than)
    • LE (less than or equal to)
    • LT (less than)
    • NE (not equal to)

    For the EXCEPTNS and ALERTS columns, only the EQ and NE operators are supported. If any other operator is specified, the message CQM336E is issued.

  3. Specify a column name, operator, and column value for the filter line.

    If you specify EXCEPTNS or ALERTS columns, complete the following steps:

    1. Press Enter to open a selection panel.
      Create Exceptions Column Filter Line

      Select one or more exception types to include in the EXCEPTNS filter. Use this panel to define how exception events are evaluated during filtering.

      Figure 2. Create Exceptions Column Filter Line panel
      ---------------- Create Exceptions column Filter Line ----------------
                                                                            
        _  C (CPU Time threshold)      _  P (CPU Time Anomaly)              
        _  E (Elapsed Time threshold)  _  L (Elapsed Time anomaly)          
        _  G (GETPAGE threshold)       _  T (GETPAGE anomaly)               
        _  S (SQL calls threshold)     _  Q (SQL Code threshold)            
        _  D (Delay threshold)                                              
       AND/OR within a column rule will be applied to selected types.       
       EQ/AND - the column contains all of the selected types.              
       EQ/OR  - the column contains at least one of the selected types      
       NE/AND - the column does not contain any of the selected types.      
       NE/OR  - the column does not contain at least one of the             
                selected type.                                              
       Types that were not selected do not participate in filtering and     
       rows containing these types in the Exceptions column will be shown   
       if they satisfy the filter for the selected types.                   
          Press Enter to update dialog options or PF3/CANCEL to exit        

      For the EXCEPTNS columns, values represent exception type codes defined in the monitoring profile and indicate threshold violations during SQL execution. For more information about these exception codes, see Exceptions.

      Create Alerts Column Filter Line

      Select one or more alert types to include in the ALERTS filter. Use this panel to define how alert events are evaluated during filtering.

      Figure 3. Create Alerts Column Filter Line panel
      ------------------ Create Alerts column Filter Line ------------------
                                                                            
        _  C (CPU Time threshold)      _  P (CPU Time Anomaly)              
        _  E (Elapsed Time threshold)  _  L (Elapsed Time anomaly)          
        _  G (GETPAGE threshold)       _  T (GETPAGE anomaly)               
        _  S (SQL calls threshold)     _  Q (SQL Code threshold)            
        _  D (Delay threshold)         _  O (GETPAGE Objects)               
       AND/OR within a column rule will be applied to selected types.       
       EQ/AND - the column contains all of the selected types.              
       EQ/OR  - the column contains at least one of the selected types      
       NE/AND - the column does not contain any of the selected types.      
       NE/OR  - the column does not contain at least one of the             
                selected type.                                              
       Types that were not selected do not participate in filtering and     
       rows containing these types in the Alerts column will be shown       
       if they satisfy the filter for the selected types.                   
          Press Enter to update dialog options or PF3/CANCEL to exit        
      

      For the ALERTS columns, values represent alert type codes defined in the monitoring profile and indicate threshold violations during SQL execution. For more information about these alert codes, see Alerts.

      Logical processing
      For the EXCEPTNS and ALERTS columns, selected values are evaluated according to the operator and the AND/OR within a column setting as follows:
      • EQ with AND

        The column must contain all selected types.

      • EQ with OR

        The column must contain at least one selected type.

      • NE with AND

        The column must not contain any selected types.

      • NE with OR

        The column must not contain at least one selected type.

      Restrictions and considerations
      For the EXCEPTNS and ALERTS filter lines:
      • Only one filter line can be defined for each of the EXCEPTNS and ALERTS columns.
      • The REPEAT (R) command is not supported.
      • Creating, inserting, or repeating an additional filter line results in the message CQM337E.
      • At least one value must be selected. If no values are selected, the message CQM338E is issued. The panel remains open so that values can be selected or the operation can be canceled (PF3).
      • Summaries, SQL codes, and Db2 commands are not affected by EXCEPTNS and ALERTS filtering.
    2. Press Enter to save your selections.

      If you cancel (PF3) the selection panel or do not select any values, no filter line is created.

  4. Press Enter. The Create Filter Line window closes, and the Active Filters panel is displayed.
    The filter line you created is listed in the display area at the bottom of the panel:
    Figure 4. Active Filters panel
    CQM$FILT ------------ Active Filters --------------------  Row 1 of 2   
    Option  ===> _________________________________________________________________ 
                                                                                   
      Type "CREATE" on command line to create filter line                          
                                                                                   
      Enable Filtering......... N  (Y/N)   Mixed Case … Y (Y/N)                                                
      Exclude Filtered Data.... N  (Y/N)  Match Case … N (Y/N)                                                       
      Display Defined Filters.. N  (Y/N)                                           
      Filter Dataset Name...... ________________________________________       
                                                                                   
      AND/OR between columns... AND  (AND/OR)                                      
      AND/OR within a column... OR_  (AND/OR)                                      
                                                                                   
    C:I-Insert,U-Update,V-View,R-Repeat,D-Delete                                   
    ------------------------------------------------------------------------     > 
    CMD  Column   OP Value                                                         
     -   -------- -- --------------------------------------------------------------
     _   PLAN     EQ PLANA                                                         
     _   PROGRAM  EQ PROGRAM1                                                      
    ***************************** Bottom of Data **********************************
     Press Enter/PF3 to update filter variables or CANCEL to exit                 
  5. Press PF3 to save the filter and exit the Active Filters panel.