Running a query and displaying a report

When you run a query, QMF displays the retrieved data as a report. The appearance of the report is controlled by choices you make on QMF form panels.

About this task

You can run a query with only one table selected, and some or all columns selected.

Edit codes that are used on forms control how different data types are formatted. Because QMF applies different default edit codes to different data types, some of the columns on your report might display only the data type and length rather than the actual data in the column.


To run a query:

  1. From the Specify panel, press the Cancel function key. The Prompted Query panel displays your query.
  2. Press the Run function key.

    You can also enter RUN QUERY on the QMF command line.

    When QMF finishes running your query, it displays a report that shows all of the data that you selected, as shown in the following figure.

    If your query selects many rows, you might need to scroll forward to see all the data.

    Figure 1. QMF displays your data as a report.
       NAME         DEPT    JOB      SALARY        COMM
       ---------  ------  -----  ----------  ----------
       JAMES          20  CLERK    13504.60      128.20
       NGAN           15  CLERK    12508.20      206.60
       NAUGHTON       38  CLERK    12954.75      180.00
       YAMAGUCHI      42  CLERK    10505.90       75.60
       KERMISCH       15  CLERK    12258.50      110.10
       ABRAHAMS       38  CLERK    12009.75      236.50
       SNEIDER        20  CLERK    14252.75      126.50
       SCOUTTEN       42  CLERK    11508.60       84.20
       LUNDQUIST      51  CLERK    13369.80      189.65
       WHEELER        51  CLERK    14460.00      513.30
       BURKE          66  CLERK    10988.00       55.50
       GAFNEY         84  CLERK    13030.50      188.00
  3. If you want to change the query, press the Query function key to return to the Prompted Query panel.