SQL/MX Report Writer Guide

Using MXCI and the Report Writer
HP NonStop SQL/MX Report Writer Guide527194-002
2-16
Creating a Command File With a Text Editor
Creating a Command File With a Text Editor
You can use a text editor to create a command file that contains all the commands
needed to define a report. Note these considerations:
The first command must set mode to REPORT.
The SELECT command must precede the report formatting commands.
For more information about providing data selection criteria when you execute a
command file, see Using Parameters With SELECT Commands on page 3-24.
Creating a Command File From a Log File
1. When you start logging, specify that you want only commands (not output) written
to the log file.
To specify that only commands are to be logged to a file named REPDEFN, enter:
>> LOG REPDEFN COMMANDS CLEAR;
2. Set REPORT mode.
3. Enter a SELECT command.
4. Enter report formatting commands.
To stop logging commands, enter:
>> LOG ;
You can now use the log file as a command file. With this method, every command you
enter is written to the log file, including FC and LIST. You might want to use a text
editor to examine the file and make necessary changes before using the file.