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-20
Using the Report Writer to Produce Text From Data
Creating an Command File From a Log File
You can use a log file as a command file. When you start logging, specify that you
want only commands written to the log file. For example, the following command
specifies only commands are to be logged to a file named REPDEFN:
>> LOG REPDEFN COMMANDS CLEAR;
Next, enter commands in the same order as shown in Saving Report Commands in an
Command file on page 2-16. Set the LIST_COUNT option, enter a SELECT command,
and then enter the report formatting commands. (With this method, you do not need to
save the commands by using the SAVE command.)
To stop logging commands, enter the following:
>> 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 any necessary changes before using the file.
Using the Report Writer to Produce Text From Data
You can use the report writer to produce text from data, thereby creating a command
file or an input file for other applications.
The following example illustrates how you can retrieve statistics from one SQL catalog
table and produce several edit files. These edit files are then used as command files to
transfer the statistics to a different catalog for analysis.
In this example, RPXSTATS is a set of SQLCI reports that can obtain the statistics,
INVOKE directives, and FILEINFO commands for either a single table or for all tables
and the associated indexes (if any).
RUNXREPS is the command file that evokes RPXSTATS.
Before you run RUNXREPS, you must assign a value to the parameter named ?TBOL
to specify the data that you want to retrieve, as follows:
SET PARAM ?TBOL value
•
To retrieve data for a single partition of a single table, value is a fully qualified file
name as follows:
SET PARAM ?TBOL "%$DATA.SUBVOL.ATABLE%";
•
To retrieve data for all partitions of a single table, value is a TABLENAME without
qualification as follows:
SET PARAM ?TBOL "%ATABLE%";
•
To retrieve data for all tables in the current catalog, value is the wild-card character
% as follows:
SET PARAM ?TBOL "%";