*TOOLS/QRYEXPORT |
Create an Export File Based on Query Definition |
CALL "*tools/qryexport", queryName$, queryLib$, exportfile$ [, queryopts$, show_flg$]
Where:
queryName$ |
Required |
Input |
Name of the query to use to generate the export file. | ||||||||||
queryLib$ |
Required |
Input |
Library where the query is defined. | ||||||||||
exportfile$ |
Required |
Input |
Name of the export file to write to. (To write to a client machine, include the [lcl] prefix in the file name.) Export file types are determined by their file extension. Supported types include:
| ||||||||||
queryopts$ |
Optional |
Input |
Flag to determine additional content to add to the file. Possible values are:
| ||||||||||
show_flg$ |
Optional |
Input |
Flags to determine interactive behavior at run time. Possible values are:
Note: |
This utility is a CALLed program that exports data to a spreadsheet-supported file based on a query definition. The file has of a header record consisting of the column headings defined in the query, followed by data records of the resulting query data set. By default, columns defined as hidden in the query definition are excluded but can be included by setting the queryopts$ optional parameter to "H".
The file types that are supported are comma separated (.csv), tab delimited (.txt), symbolic link (.slk) and Microsoft XML (.xml). The type of file is determined by its file extension. Unsupported file extensions will result in Error #17: Invalid file type or contents.
(The QryExport utility was added in PxPlus 2024.)