GRACE C-1


NAME



grace - run a report writer program

 

SYNOPSIS

 


grace [-atwx] [ #copies ] report

 

DESCRIPTION



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.

#copies

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.

NCOPIES

Provides the number of copies that are made for the report output when
output has been edirected 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.

ONPRINTER

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.

PRINTER

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 standard parameter form. This parameter form accepts
input in the same manner as form(C-1). In regards to the question

Output Device?

Pressing the and 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:

Filename

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).

Printer Id

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.

Printer Name

A printer name can either be entered manually or by using the and
keys to toggle through available printers. When a valid printer has been
entered the

Port/Spooler

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:

PRINTER="lp -s"
export PRINTER

The above uses the System V printer spooler and the -s flag tells the
spooler not to display the print job number. PRINTER cn also set the
file name, as in:

PRINTER=/dev/lp
or
PRINTER=myfile

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 |
| Space |
| ^ Up arrow Display previous page |
| <-- left arrow Scroll screen left |
| --> right arrow Scroll screen right |
| Q or q Terminate the report |
| R or r Redisplay current page |
| ? Display help message |
--------------------------------------------------------


SEE ALSO



crw(C-1), rptedit(C-1), rptadmin(C-1), wtrdef(C-1), wtr(C-1).


FILES

/tmp/gi$$ /tmp/gt$$

WARNINGS

When naming a reportfile that begins with a digit, it is sugguested
that a directory pathname or a database tilde ~ precede the reportfile
name (depending on whether the report is the pathname for a report or
a logical reportfile name). Otherwise, grace may try to evaulate the
reportfile name as the #copies flag.