Create a filter


About this task

We can create filters for any IBM MQ object, including channels, queues, listeners, and services. A filter can be applied only to one type of object because different types of objects have different attributes.

The following instructions use an example of creating a filter for queues so that only local queues with names that start with jupiter and that contain more than 50 messages are displayed in the Content view. We can easily adapt the instructions to create filters for other types of object too.

To create a new filter:


Procedure

  1. In the Content view or dialog that contains the table, click the small arrow next to the current filter name. A menu is displayed.
  2. From the menu, click Manage Filters. The Manage Filters dialog opens displaying the filters that already exist for the object type.
  3. In the Manage Filters dialog, click Add The Add Filter dialog opens.
  4. In the Add Filter dialog, in the Filter Name field, type a name for the filter; for example, Queues containing more than 50 messages
  5. Following the Filter Name field, are the Includes objects where fields, in which we can enter the criteria to add to the new filter. For example, if we are creating a filter for queues, the fields are labeled Includes Queues where. Enter the following information:
    1. The first row of fields allows you to filter on the name of the object. By default, the third field contains an asterisk (*) so that all objects, regardless of their names, are included in the filter. For example, to include only the queues that start with jupiter, type jupiter*
    2. Queues and channels only: The next row of fields allows you to filter on the type of the object. By default, the filter includes all types of the object. For example, to include only local queues, select Local Queue.
    3. Optional: We can enter another criteria to the filter based on the value of an attribute of the objects. Select the check box labeled - and - so that we can edit the fields. For example, to include only queues that contain more than 50 messages, in the first field, select the attribute Current queue depth; in the second field, select Greater than; in the third field, type 50.

  6. Optional: To automatically apply an existing column scheme when the filter is applied, select the check box labeled Automatically apply a Column Scheme when this filter is applied, then select the column scheme from the list.
  7. Click OK. The Add Filter dialog closes. The new filter is displayed in the Manage Filters dialog with any other available filters.
  8. In the Manage Filters dialog, click OK. The Manage Filters dialog closes.


Results

We can now apply the filter to the table.

Parent topic: Filtering the objects displayed in tables


Related concepts


Related tasks