Command Reference : Command Reference
Redirect printer output.
You may specify that any procedure that would normally send output to the printer puts output in a text, Rich Text Format (RTF), or comma-separated value (CSV) file, in a spool object, or into frozen table or graph objects in the current workfile.
output base_name
output(f) base_name
output(options) [path\]file_name
output(s) spool_name
output off
By default, the output command redirects the output into frozen objects. You should supply a base name after the output keyword. Each subsequent print command will create a new table or graph object in the current workfile, using the base name and an identifying number. For example, if you supply the base name of “OUT”, the first print command will generate a table or graph named OUT01, the second print command will generate OUT02, and so on.
You can also use the optional settings, described below, to redirect table and text output to a text, RTF, or CSV file, or all output (including graphs) to an RTF file. If you elect to redirect output to a file, you must specify a filename.
You can use the “s” option, described below, to redirect all output to a spool object.
When followed by the optional keyword off, the output command turns off output redirection. Subsequent print commands will be directed to the printer.
Redirect all output to frozen objects in the default workfile, using base_name.
Redirect table and text output to a text file. Graphic output will still be sent to the printer.
Redirect all output to an Rich Text Format (RTF) file.
Redirect all output to an comma-separated value (CSV) file.
Redirect all output to a spool object.
Overwrite file if necessary. If the specified filename for the text, RTF, or CSV file exists, overwrite the file. The default is to append to the file.
Only Applicable when text, RTF, or CSV file output (specified using options “t”, “r”, or “v”).
Command logging. Output both the output, and the command used to generate the output.
This option is only applicable in a program when used in conjunction with the pon command which enables automatic printing of output. The use of pon is not required when output is specified in a command window.
Only Applicable when text, RTF, or CSV file output (specified using options “t”, “r”, or “v”).
output print_
causes the first print command to generate a table or graph object named PRINT_01, the second print command to generate an object named PRINT_02, and so on.
output(t) c:\data\results
equation log(gdp) c log(k) log(l)
output off
The first line redirects printing to the RESULTS.TXT file, while the print option of the second and third lines sends the graph output to the printer. The last line turns output redirection off and restores normal printer use.
If instead, the first line read:
output(r) c:\data\results
all subsequent output would be sent to the RTF file RESULTS.RTF.
output(s) mySpool
redirects all output to the MYSPOOL spool. If the spool already exists, printed objects will be appended to the end of the spool.
See “Print Setup” for further discussion.
See also pon, poff.