12. Report-Writer Statements : Report Setup Statements : .Output Statement—Specify File Name for a Report : Description
 
Share this page                  
Description
The .output statement is an optional statement that specifies the name of a file where the report is written.
If you specify a variable for filename, Report-Writer evaluates the variable during the loading of the report specification, before retrieving the data.
If you don't use the .output statement in your report specification, Report-Writer either directs the output to the screen, or to a file name specified on the command line for the report command with the ‑f flag. The ‑f flag takes precedence over the .output statement. If both the ‑f flag and the .output statement are present, the report results are sent to the file specified by the ‑f flag, rather than of the .output statement. If the .output statement is not specified, and no file is specified with the ‑f flag, the report appears on your screen.
VMS: If you give the full path name for a file, enclose the name in single quotes. If it is the name of a file in the current directory, no quotes are needed.