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 column to the value you specify for the Column Value field using the operator you specify (for example, EQ, GE, GT, LE, LT, NE).

If a match occurs, then the data are filtered according to the value you specify for the Exclude Filter Data field on the Active Filters panel. For example, if you specified Y in the Exclude Filter Data field, data are excluded from display when a match occurs. If you specified N in the Exclude Filter Data field, data are not excluded from display when a match occurs; instead, data that do not produce a match are 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.
    Figure 1. Create Filter Line window
    --------------------------- 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)              
      Operator      EQ         (EQ,GE,GT,LE,LT,NE)                            
      Column Value  __________________________________________________________
      _________________________________________________________________

    The input fields that display on the Create Filter Line panel include:

    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 specified with any column value specified with a wildcard (* or %) or set to N/A.
    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), and NE (not equal to).
  3. Specify a column name, operator, and column value for the filter line.
  4. Press Enter. The Create Filter Line window closes, and the Active Filters panel displays. The filter line you created is listed in the display area at the bottom of the panel:
    Figure 2. 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.