SQL/MP Report Writer Guide
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to the NonStop SQL/MP Report Writer
- 2 Using SQLCI and the Report Writer
- 3 Selecting Data for a Report
- 4 Customizing a Report
- Defining the Layout
- Specifying the Items in a Detail Line
- Naming Select List and Detail Line Items
- Organizing Rows Into Break Groups
- Labeling Information
- Formatting Data Values
- Formatting Dates and Times
- Using TACL to Pass Parameters
- Conditional Printing of Items or Line Entries
- Redefining Special Characters
- Calculating Totals
- Calculating Subtotals
- Printing Double-Byte Characters
- A Comparison of the Report Writer and the Enform Language
- Index

Using SQLCI and the Report Writer
HP NonStop SQL/MP Report Writer Guide—527213-001
2-13
Executing a Command Repeatedly
OUT_REPORT Files
You can direct output from a SELECT command, both default reports and customized
reports, to a specific file by using the OUT_REPORT command. Enter the following
command to direct reports to a disk file named DRAFT:
>> OUT_REPORT DRAFT;
The following command directs reports to a spooler collector for a printer:
>> OUT_REPORT $S.#PRINTXX;
Log Files
If you specify a log file for your session by entering the LOG command, SQLCI 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 when the
OUT file is your terminal and you have not specified an OUT_REPORT file. Optionally,
you can specify that you want only the commands written to the log file.
If you want to print a report, and you want the report definition to be printed preceding
the report, you can use the log file.
Suppose the file REPORT55 contains all the commands needed to print a report. The
first command in the file is:
LOG $S.#PRINTER;
Enter the following command to print the definition as well as the report:
>> 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 and to the OUT_REPORT file.
To turn logging off, enter:
>> LOG;
Executing a Command Repeatedly
There are three ways to execute commands repeatedly:
•
Use the FC, !, and HISTORY commands.
•
Use the PREPARE and EXECUTE commands. (For an example, see Preparing a
SELECT Command on page 3-24.)
•
Use the OBEY command.
If you want to execute a set of commands repeatedly, you should put the commands in
an command file. You can either use a text editor to create the file or enter the
commands interactively and then use the SAVE command to write them to a command
file. For more information on examples of creating command files, see Defining
Reports in Command Files on page 2-15.