SQL/MP Report Writer Guide

Using SQLCI and the Report Writer
HP NonStop SQL/MP Report Writer Guide527213-001
2-15
Defining Reports in Command Files
The semicolon terminator is optional for FC and ! commands. You can enter these
commands at the S> prompt also. If you are listing rows retrieved by a SELECT
command and decide to change the command, use a CANCEL command to return to
the SQLCI prompt. Then enter the FC or ! command.
Defining Reports in Command Files
There are three ways to define a report in a command file:
You can prepare the report in steps. This method lets you view the result of the
report formatting commands you enter as you work and then save the report
commands in a file when you are satisfied with the report format.
You can create the report commands in a command file using a text editor.
You can log only the commands to a log file and then use the log file as a
command file.
Figure 2-9. Example of Repeating Stored Commands
>> SELECT PARTNUM, QTY_AVAILABLE
.. I, PRICE
Example 1
S>
Press RETURN.
..
Insert change and press RETURN.
>> FC SELECT P
>> SELECT PARTNUM, QTY_AVAILABLE, PRICE
Press RETURN.
+> FROM SALES.PARTS;
..
Request History.
SQLCI
displays most
recent
commands.
Reexecute command 3
SQLCI displays and
executes command
Example 2
>> HISTORY 7
3 > SELECT PARTNUM, QTY_ AVAILABLE FROM SALES.PARTS;
4 > LIST ALL;
5 > FC SELECT
P
6 > SELECT PARTNUM, QTY_ AVAILABLE, PRICE FROM SALES.PARTS;
7 > LIST NEXT 3 ;
8 > CANCEL;
9 > HISTORY 7;
>> ! 3
>> SELECT PARTNUM, QTY_ AVAILABLE
+> FROM SALES.PARTS;
VST0209.vsd