SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
O-8
Example—OUT
Example—OUT
In this example, SQLCI output is directed to a printer. After the SELECT command is
executed, the output is redirected to the initial OUT file.
>> OUT $S.#FASTPRT;
>> SELECT * FROM EMPLOYEE;
>> OUT;
OUT_REPORT COMMAND
OUT_REPORT is an SQLCI report writer command that directs the formatted output of
a SELECT command to a specified report file, instead of to the OUT file.
file
is a Guardian name that specifies a disk, device, or process file (such as a spooler
collector) for reports. file cannot be the current IN file or any current output file
(such as the LOG or OUT file) unless it is a terminal or process.
If you specify the name of a nonexistent disk file as file, the report writer creates
an EDIT file of that name.
If you omit file, the report writer closes the current OUT_REPORT file and
directs reports to the current OUT file.
CLEAR
clears the new file before anything is written to it. If you omit CLEAR, reports are
appended to the existing data in the file. CLEAR is ignored unless the file is a disk
file or process.
SPOOL3 spool-option [ , spool-option ] ...
specifies one or more level 3 spooling options. The options apply only to spooler
files that have not already been opened by previous OUT or OUT_REPORT
commands; they have no effect on open files.
OUT_REPORT [ file ]
[ CLEAR ] ;
[ SPOOL3 spool-option [, spool-option] ... ]
spool-option is:
{ LOC loc-name }
{ FORM form-name }
{ REPORT rpt-name }
{ COPIES number }
{ PAGESIZE number }