grace - run a report writer program
grace [-atwx] [ #copies ] report
Grace provides a convenient way of running C/Base reports and channeling output to the screen or printer. If output is displayed on the screen, grace handles wide report viewing and paging of output. If report is specified as -, standard input is used for output.
If report is the name of a logical report, the reportfile catalog contains information regarding the reportfile's compiling status. If the logical report has the precompile status field set to yes, a compiled reportfile is maintained. The compiled reportfile pathname is formed by appending .rw to the pathname of the logical reportfile. If a compiled reportfile is being maintained, the reportfile will be compiled if the modification time for the compiled reportfile is earlier than the reportfile, or if the compiled reportfile does not exist. If the precompile status field is set to no, grace creates a temporary file for the compiled version of the report. The temporary file is interpreted by wtr(C-1) and then removed.
The following flags apply to grace.
-a Forces a parameter form to be displayed that requests whether output from grace is to be directed to a printer. This form accepts input in the same manner as form(C-1).
-t Forces the output of grace to be sent to the screen. With the -t flag, the parameter form for grace will not be displayed.
-x Displays on standard output commands run by grace.
Specifies how many copies of the report output are to be made. The value for #copies is a numeric value. If the #copies flag is used, it is assumed that the output is to go to the printer with #copies copies of the report output made.
The following environment variables are recognized by grace.
Provides the number of copies that are made for the report output when output has been redirected to the printer using the ONPRINTER environment variable. The value for NCOPIES provides an initial value for the number of copies to be made when the parameter form for grace is displayed.
Grace evaluates the value for ONPRINTER as a boolean value that specifies whether report output should be redirected to the printer. If ONPRINTER is set to yes, report output is redirected to the printer. Conversely, if ONPRINTER is set to no, report output is sent to standard output. With the -a flag specified, grace's parameter form is displayed using the ONPRINTER value as an initial value for the answer to the question "Output on Printer?". With the -a flag omitted, no questions are asked regarding output destination.
When output is sent to the printer, the value for PRINTER names the file or command where output is redirected. When output is sent to the printer and the environment variable PRINTER is not set, output is defaulted to "LPT1".
If the standard output file is not redirected, and the output destination is not specified with the use of flags and environment variables, grace responds with the following parameter form:
This parameter form accepts input in the same manner as form(C-1). In regards to the question
Pressing the <F2> and <F3> will toggle through the available output devices. Three devices are supported: printer, screen, and file. A selection of screen will send the output of the report to standard output. A selection of file will send the output of the report to a file. In this case, grace will evaluate the response to the question:
A filename will put the file into the current directory or a full pathname can be specified. If file is not selected then information in this field is ignored. A selection of printer will cause output to be sent to the printer. In this case, grace also evaluates the response to the question:
Number of copies?
This field accepts numeric values. If this field is left blank, the default is one (1).
This field identifies the id of the printer as specified by the printer information entered in via the PRTSET(C-1) program. When output is sent to the printer, it is piped to a the printer specified in printer name.
A printer name can either be entered manually or by using the <F2> and <F3> keys to toggle through available printers. When a valid printer has been entered the
This field will display the port or spooler associated with the printer. This can be changed by setting the environment variable PRINTER. PRINTER may be set to another command name (including arguments), such as:
The above uses the MSDOS printer spooler as a default printer . PRINTER can also be set to a file name, as in:
and the output is written to that file.
If the report output is displayed on the screen, it is displayed one screenful at a time. After each screenful, grace displays:
--More -- [Press ? for help]
at the bottom of the screen. You can respond with the following keys:
Return Display next page
Display previous page
Scroll screen left
Scroll screen right
Q or q Terminate the report
R or r Redisplay current page
? Display help message
crw(C-1), rptedit(C-1), rptadmin(C-1), wtrdef(C-1), wtr(C-1).