.Output Statement--Specify File Name for a Report
The .output statement specifies the file name where the report is written.
The .output statement has the following format:
.output | .out filename
The parameters for the .output statement are as follows:
filename
A file to which the formatted report is written each time the report is run. The filename parameter must follow all conventions for valid file names in the operating system.
The filename can be expressed as a variable.
$filevariable
Variable whose value is the file name. The variable is preceded by a dollar sign ($).
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.
Examples
1. Write to file in current directory.
.output myreport.lis
2. Write to file with full path name.
Windows:
.out \direct\subdirect\myreport.lis
Linux:
.out /direct/subdirect/myreport.lis
Last modified date: 08/14/2024