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.
To create a new query, use the toolbar menu option Explorer>New, and select the type of query that you want to create from the menu. You can select CICS®, Affinity, IMS™, DB2®, MQ, Command Flow, or Natural and enter the type of resources that you want to find and the interactions that you want to search.
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 typing over 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 and use the New option to perform actions on a query.
Selecting Copy copies the definition of the query to the clipboard, which you can paste into either the same folder or a different folder in the Query 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 executing SQL and collecting results.
The Run option activates the query and the results are shown in the Resources 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. Use the main menu 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.
A new dialog box is displayed when you use the main menu Explorer>Save option, where you can enter a relevant name to record against the results, as shown in the screen capture below named Before Fix 123456 applied. You must name the query using allowed characters listed in Valid query and folder names.
The saved results for a query shown in the Query view are children of the query. The screen capture below shows the query result Before Fix 123456 applied data beneath the Programs that are exits query list. The date and time are appended to the name entered in the Save query results view, so that you can view information about why and when the query was run.
If you right-click a set of query results and select Copy, the query data is placed into 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.
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.