TO   (Delimited reports)

Top  Previous  Next

 

The TO keyword used in a LIST or SORT command with the CSV or DELIMITER options specifies the pathname of the output file.

 

 

Format

 

TO pathname {NO.QUERY | APPENDING}

 

where

 

pathnameis the pathname of the file to receive the output.

 

 

The CSV and DELIMITER options of the query processor create a delimited format report which is normally directed to the screen or, by use of the LPTR keyword, to a print unit. The TO option can be used to direct the output to the file identified by pathname.

 

If the target pathname already exists, the user will be prompted to confirm whether it should be overwritten. The NO.QUERY option suppresses this prompt, overwriting the existing file. The APPENDING option causes the output to be appended to the output file if it already exists. The NO.QUERY and APPENDING options may not be used together.

 

Use of TO implies use of HDR.SUP as the output is not paginated.

 

 

Example

 

LIST STOCK PROD.NO QOH DESCR CSV TO C:\STOCK.CSV

 

This command constructs comma separated format report of the STOCK file into the C:\STOCK.CSV file.