Charting query results as a user-defined map
You can chart query results as a map by using QMF Analytics for TSO.
About this task
Maps render query results on to defined area.
This topic provides an example for charting information geographically by using a user-defined map.
In the example you map rainfall data from a climate query to a defined geographic region (eight states of the United States). Say you worked for a company that manufactured and distributed foul-weather gear. A map that shows which of eight states have the heaviest rainfall might be useful for communicating and explaining sales strategy.
This procedure uses the
- Start QMF for TSO.
Your QMF administrator can tell you how to start a QMF session and give you a user ID. Check with your QMF administrator if you have any questions about getting started with QMF.
- From the QMF Home Panel, enter DISPLAY
Q.CLIMATE_USA on the command line and press Enter.
QMF for TSO displays the query result as a multi-columned report.
- Enter SHOW ANALYTICS on the command line and press Enter to start QMF Analytics for TSO.
- Tab to Map in the Charts section
of the QMF Analytics for TSO Home
panel and press Enter.
The Parameter Selection panel is displayed.
- Create the specification for your analysis.
Set your parameters as shown in the following table.
In the Parameter Selection panel, set cursor to the field Specify the location to be mapped, press F4 to open the Coordinate Table Selection dialog, and press F4 (New) to create a user-defined map.In the User Coordinate Table Selection dialog, specify the table that you want to use for building the map:
- Select the database from that you want to use the coordinate table. If you select TSO, specify the CSV delimiter and header options.
- In the Short Name field enter the name for the table that you want use for it in the Coordinate Table Selection dialog.
- In the Coordinate table name field, type the table name in the database.
- Press F2 to save the user-defined map and return to the Parameter Selection panel.
Table 1. Parameter Settings for User-defined Map Parameter Setting Table Location Db2® Short Name USERMAP Coordinate Table Name Q.MAPUSA
You can enter column names manually or you can tab to the field and press the List function key (F4).
The List function opens a Column Selection window that lists all of the column names from the query result. To select a column from the Column Selection window, tab to the column name and press Enter. QMF Analytics for TSO adds the name to the Parameter Selection panel automatically.
Table 2. Parameter Settings for Map Parameter Setting Specify the column which contains the data to be mapped RAINFALL Specify the column which links the data to the map coordinates STATE Specify the location to be mapped USERMAP Chart Title
Enter a title or accept the default asterisk (*).
If you accept the default value of asterisk (*), QMF Analytics for TSO creates a title based on the columns that you have selected.
If you delete the asterisk (*) and leave this field blank, the analysis output will not include a title.
- Optional: Press the Save function key (F5)
to save the specification to the QMF database
as an ANALYTIC object. Saving the specification to the database allows you to run your analysis directly from the QMF command line at a later time, without having to navigate to the QMF Analytics for TSO Home panel and reenter the parameters. Saving specifications makes sense if you plan on running the analysis frequently or multiple times.Note: The global variable DSQEC_SESSGLV_SAV in QMF controls how the autosave for parameter settings works. For information about Global Variables, see Global Variable List in the QMF help.
- Press the Run function key (F2) to generate the map.
The map generated is color-coded and includes a key for associating colors to rainfall amount. In this example you can see that Washington state receives the highest amount of rainfall of all the states
- Press the End function (F3) key to return to the Parameter Selection panel.
- Press the End function key again to return to the QMF Analytics for TSO Home panel.
- Press the End function key again to return to the query results.
- Optional: If you have configured print capabilities in QMF, you can print the map.