Queries view

Use the Queries view to view a list of queries and folders. Folders can contain other folders and are a way of organizing and grouping queries. Queries are user defined definitions of resources to be searched.

Example

Screen shot of the Queries view that shows the Query names listed under each query type, that is Affinities, CICS, and DB2.

To create a new query, use the menu option Explorer > New, and select the type of query that you want to create. You can select CICS®, Affinity, IMS™, DB2®, MQ, Command Flow, or Natural. You can then enter the type of resources that you want to find and the interactions that you want to search.

Screen shot showing how to open a new query.

To create a new folder, use the toolbar menu option Explorer > New > New Folder. This option creates a folder called New Folder, which you can rename by overtyping it with a new name. You must name the folder using only the allowed characters listed in Valid query and folder names.

You can also right-click anywhere in the window and use the New option to perform actions on a query.

Screen shot showing an alternative way to open a new query.

Select Copy to copy the definition of the query to the clipboard. You can then paste the definition into either the same folder or a different folder in the Queries view. If you paste the clipboard contents into a text editor, you see the raw SQL strings that are run against the DB2 tables. This feature is useful for users who have their own method of running SQL and collecting results.

The Run option activates the query and the results are shown in the Resources view view.

When the Resources view shows the result of running a query, you can save the results listed under the query name in the Queries view. Click Explorer > Save. For example, if you run a query the results are shown in the Resources view and the name of the query is displayed in the toolbar above the results.

Screen shot that shows the where to save the results of a query.

A new dialog box is displayed when you use the menu option Explorer > Save, where you can enter a relevant name to record against the results. The following screen capture shows the name Before Fix 123456 applied entered. You must name the query using allowed characters listed in Valid query and folder names.

Screen shot of the Save query results window where you enter the query results description.

The saved results for a query that are shown in the Queries view are children of the query. The screen capture shows the data for the query result Before Fix 123456 applied beneath the Programs that are exits query list. The date and time are appended to the name entered in the Save query results window so that you can view information about why and when the query was run.

Screen shot that shows the List of query results.

If you right-click a set of query results and select Copy, the query data is placed on the clipboard. You can then paste the data into a spreadsheet or other tools for analysis, if required.

If you right-click a set of query results and select Run, the data that was saved opens in the Resources view view.

If you open a different query result, a similar query runs on different dates. You can use the Compare resources view to see what has changed and build up a picture of change over time. You can delete the query results individually. If a query is deleted, all of its results are also deleted.