SQL/MX Report Writer Guide

Using MXCI and the Report Writer
HP NonStop SQL/MX Report Writer Guide527194-002
2-13
Specifying Log Files
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 these 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 SELECT output, as if you had
entered the LIST FIRST command.
Specifying Log Files
If you specify a log file for your session by entering the LOG command, MXCI logs the
commands you enter and the information that the commands produce to a log file. The
content of the log file is the same as the information you see on your screen.
Optionally, you can specify that you want only the commands written to the log file.
To print a report with the report definition preceding it, you can use the log file.
Suppose the file REPORT55 contains all the commands needed to prepare a report.
To include the definition as well as the report, enter:
>> OBEY REPORT55;
As the commands in the command file execute, they are logged to the log file. The
report is written to the log file.
To turn logging off, enter:
>> LOG;
Print the file REPORT55 from OSS using the lp command. For information about the
lp command, see the Open System Services Users Guide.
Executing a Command Repeatedly
There are three ways to execute commands repeatedly:
Use the FC, !, and HISTORY commands.