You can use the EXPORT command to retrieve data and view
it in a spreadsheet format.
About this task
Suppose that a colleague wants to know which of your sales
representatives sold less than $1000 of your product so far in the
third quarter. Your colleague wants the information about these sales
representatives in comma-separated value (CSV) format so that the
data can be viewed and manipulated in a spreadsheet program. First,
you must run a query to retrieve the information. Then, you can export
the data in CSV format and download the CSV file to your workstation.
Procedure
To retrieve and export the data in CSV format:
- From the QMF home
panel, press the Query function key.
- Enter the following query:
SELECT * FROM SALESTOTALS WHERE Q3 < 1000
- Press the Run function key.
- On the command line of the QMF home
panel, enter the following command:
EXPORT DATA TO Q3SALES (DATAFORMAT=CSV
The
data is exported to a data set named userid.Q3SALES.DATA.
By
default, column headings are exported along with the data. To exclude
the headings, you can use the HEADER option, as in the following example:
EXPORT DATA TO Q3SALES (DATAFORMAT=CSV HEADER=NO