Query editor

You can use the query editor to create queries to search resources. You can query any resources in any combination. You can add filters to the query to refine the results, and you can define the structure of the results that are displayed.

You can use the query editor for the following purposes:
You can use the query editor with the following types of queries: To run the query and display its results in the Show Resources view, you use the Queries view.

The content and structure to show

After you select the type of resource that you want to query, you can choose which information is shown in the tree structure of the Show Resources view when the query runs.

To show a resource or column, click the New icon New column icon in the Show panel, then click the required resource or column name. The selected item is shown in a tree structure in the Show panel. The resources or columns available in the list depend on the type of query that you are creating. You can select multiple items to show.

For a CICS query, if you select the Collection ID and a specific collection ID is set as the current scope in the CICS IA plug-in, this scope will be shown with the query results in the Show Resources view.

To remove a resource or column, select it in the tree structure, then click the Delete icon Delete column icon.

To change the position of a resource or column in the structure, select the item, then use the Move up Move up icon and Move down Move down icon icons, as required.

The Create query window with a list of resources and columns that can be shown for a CICS query

Interactions to include

To refine the query further for your chosen resources or columns, use the Filter results panel. For each item, appropriate filter possibilities are provided so that you can set suitable values. You can create multiple expression filters.

To add a filter, click the New icon New expression icon in the Filter results panel, then click the required resource or column. Set an expression and value in the new panel that is displayed. The controls in this panel vary, depending on the appropriate filter possibilities.

For example, if the required resource has a name relationship with one or more other resources, that is, they have the same name, radio buttons are provided to either select the resource with the name relationship, or to select values to enter.

Screen capture of the Filter results panel, showing a Program filter resource that has a name relationship with Resource name and that is set to use the value D*.

If the name relationship is with more than one column, you can click the Select column icon Select column icon, then click the required resource in the resulting menu.

Screen capture of the Filter results panel, showing a Resource name filter resource that has a name relationship with Program, Transaction, and Region Applid.

To remove a filter, select the required expression in the Filter results panel, then click the Delete icon Delete expression icon.

The following example shows a CICS query called CICS Query Programs D set to show the Resource type, Resource name, Transaction, and Program information, structured in that order. A filter is set so that only information for programs that begin with D are shown in the query results.

The Edit query window with a resource structure in the Show panel and a filter set in the Filter results panel

The following example shows the result of running the query CICS Query Programs D in the Show Resources view.

Screen capture of the Show Resources view with the results of the CICS Query Programs D query.

When your query is complete, click OK. Your query is saved and listed in the Queries view.

Filtering on the TCB CPU time for a command flow query

When you create a command flow query, you can filter on the "TCB CPU time before command" and "TCB CPU time after command" columns. These values are in milliseconds, rounded up to seven decimal places, and use the time of day (TOD) format in the database. It is advisable to use the "is less than" and "is greater than" expressions for these filters, because you are unlikely to know the exact TOD format. If you enter a value that does not match the TOD format, the filter is set to the next smallest value. For example, if you enter 0.0006 milliseconds, the filter is set to 0.000599853515625. Screen capture of the Edit Command Flow query window, showing a TCB CPU time after command column.