Charting query results as a tower chart

You can chart your query results as a tower chart by using QMF Analytics for TSO.

About this task

Tower charts show the frequency of data items in successive numerical intervals of equal size, or to show a comparison of categorical values in a query result.

QMF Analytics for TSO will plot data distributions or simple categorical values depending on the type of data in column to be used as the x-axis on the chart. QMF Analytics for TSO examines the X variable data type, data values, and number of rows before deciding whether to chart it as a distribution or as a set of categorical values.

In this example you will chart salary by department number. You might want to chart this type of data to understand which departments in a company have the highest cost.

Procedure

  1. 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.

  2. From the QMF Home Panel, enter DISPLAY Q.STAFF on the command line and press Enter.

    QMF for TSO displays the query result as a multi-columned report.

    Figure 1. Query Results
     REPORT           Q.STAFF                         LINE 1      POS 1      79    
                                                                                   
                                                                                   
                                                                                   
           ID  NAME         DEPT  JOB     YEARS      SALARY        COMM            
       ------  ---------  ------  -----  ------  ----------  ----------            
           10  SANDERS        20  MGR         7    18357.50           -            
           20  PERNAL         20  SALES       8    18171.25      612.45            
           30  MARENGHI       38  MGR         5    17506.75           -            
           40  O'BRIEN        38  SALES       6    18006.00      846.55            
           50  HANES          15  MGR        10    20659.80           -            
           60  QUIGLEY        38  SALES       -    16808.30      650.25            
           70  ROTHMAN        15  SALES       7    16502.83     1152.00            
           80  JAMES          20  CLERK       -    13504.60      128.20            
           90  KOONITZ        42  SALES       6    18001.75     1386.70            
          100  PLOTZ          42  MGR         7    18352.80           -            
          110  NGAN           15  CLERK       5    12508.20      206.60            
          120  NAUGHTON       38  CLERK       -    12954.75      180.00            
          130  YAMAGUCHI      42  CLERK       6    10505.90       75.60            
          140  FRAYE          51  MGR         6    21150.00           -            
          150  WILLIAMS       51  SALES       6    19456.50      637.65            
          160  MOLINARE       10  MGR         7    22959.20           -            
          170  KERMISCH       15  CLERK       4    12258.50      110.10            
          180  ABRAHAMS       38  CLERK       3    12009.75      236.50            
          190  SNEIDER        20  CLERK       8    14252.75      126.50            
          200  SCOUTTEN       42  CLERK       -    11508.60       84.20            
          210  LU             10  MGR        10    20010.00           -            
          220  SMITH          51  SALES       7    17654.50      992.80            
          230  LUNDQUIST      51  CLERK       3    13369.80      189.65            
          240  DANIELS        10  MGR         5    19260.25           -            
          250  WHEELER        51  CLERK       6    14460.00      513.30            
          260  JONES          10  MGR        12    21234.00           -            
          270  LEA            66  MGR         9    18555.50           -            
          280  WILSON         66  SALES       9    18674.50      811.50            
          290  QUILL          84  MGR        10    19818.00           -            
          300  DAVIS          84  SALES       5    15454.50      806.10            
          310  GRAHAM         66  SALES      13    21000.00      200.30            
          320  GONZALES       66  SALES       4    16858.20      844.00            
          330  BURKE          66  CLERK       1    10988.00       55.50            
     1=Help         2=            3=End       4=Print       5=Chart        6=Query 
     7=Backward     8=Forward     9=Form     10=Left       11=Right       12=      
     OK, Q.STAFF is displayed.                                                     
     COMMAND ===>                                                  SCROLL ===> PAGE
  3. Enter SHOW ANALYTICS on the command line and press Enter to start QMF Analytics for TSO.
  4. Tab to Tower in the Charts section of the QMF Analytics for TSO Home Panel and press Enter.

    The Parameter Selection panel is displayed.

  5. Create the specification for your analysis.
    Set your parameters as shown in the following table.

    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 1. Parameter Settings for Tower chart
    Parameter Setting
    Specify the columns to form the vertical coordinates (y-axis) SALARY
    Specify the column to form the horizontal coordinates (x-axis) DEPT
    Tabulation? No
    Chart Title

    Enter a title for your chart in the Chart Title field or accept the default value of 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.

  6. 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.
  7. Press the Run function key (F2) to generate the chart.

    QMF Analytics for TSO generates the following chart:

    Figure 2. Salary by Department Tower Chart
    Tower chart showing salary by department

    The chart shows that the accumulated salary by department. It shows that department 10 is the costliest in terms of employee salary and department 66 as the least costly in terms of employee salary.

  8. Optional: If you have configured print capabilities in QMF, you can print the chart.
  9. Press the End function key (F3) to return to the Parameter Selection panel.
  10. Press the End function key (F3) to return to the QMF Analytics for TSO Home panel.