The Queries view displays a list of data that is returned by queries that have run using data on a database. Queries are displayed in folders, these folders can contain other folders, and are a way of organizing queries. The sample queries that are shipped with the product are displayed in the queries view, and you can also create and save new queries. Queries are saved to your workspace which is defined when you install the product. You can modify the workspace location at any time when running the explorer.
To create a query, use the menu option
, and select the type of query that you want to create. You can select CICS®, Scanner, 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.To create a folder, use the toolbar menu option Valid query and folder names.
. This option creates a folder called New Folder, which you can rename by typing over it with a new name. You must name the folder using only the allowed characters listed inYou can also right-click anywhere in the window and use the New option to perform actions on a 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 Show Resources view view.
When the Show Resources view shows the result of running a query, you can save the results listed under the query name in the Queries view. Click
. For example, if you run a query the results are shown in the Show Resources view and the name of the query is displayed in the toolbar of the view.A new dialog box is displayed when you use the menu option Valid query and folder names.
, 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 inThe 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 All programs using files 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.
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 Show 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.