SQL/MP Report Writer Guide

Using SQLCI and the Report Writer
HP NonStop SQL/MP Report Writer Guide527213-001
2-12
Specifying Output Files
specifies that column 1 will be subtotaled whenever the value of any break item
changes. However, if you enter the SUBTOTAL COL 2 command, only column 2 will
be subtotaled:
S> BREAK ON DEPTNUM, JOBCODE;
S> SUBTOTAL COL 1;
.
.
S> SUBTOTAL COL 2;
Suppose you enter the following commands:
S> BREAK ON DEPTNUM;
S> BREAK TITLE DEPTNUM ("Department Number:", DEPTNUM);
If you decide you want to change the break title, reenter the command:
S> BREAK TITLE DEPTNUM ("Dept. No. ", DEPTNUM);
The second BREAK TITLE command replaces the first.
If you enter BREAK ON, SUBTOTAL, or TOTAL to the report format after listing some
rows, the report writer returns you to the beginning of the SELECT output, as if you
had entered the LIST FIRST command.
Specifying Output Files
There are three types of files to which you can direct different types of output when
using SQLCI:
OUT files
OUT_REPORT files
Log files
OUT Files
By default, all SQLCI output is directed to your terminal during an SQLCI session.
However, you can direct SQLCI output to a specific file by using the OUT command.
Enter the following command to direct SQLCI output to a spooler collector for a printer:
>> OUT $S.#PRINTZ;
All information that SQLCI produces is written to the OUT file, including output from
commands such as SHOW and DISPLAY STATISTICS, data from a SELECT
command (unless you specify an OUT_REPORT file), and diagnostic messages.