Chapter 10. Specifying report column formatting in Query for iSeries

The first part of this chapter describes how you control the format of your query output. You can change the spacing before the report columns, the headings above the columns, and the report field lengths.

In the second part of this chapter, the four ways of editing numeric fields are described. Since numeric fields of information are stored in database files without any punctuation, you can edit them so that they are easier to read when they appear in a query report or display.

Formatting the columns of the Query for iSeriesquery report

Note: The first time that you select the Specify Report Column Formatting option, the information that is shown on the display for column headings, field lengths, and decimal positions is taken from the field definitions and result field definitions. If column headings are defined for the fields, they are shown; otherwise, the field names are used as the column headings.

You can specify the following information about how the columns should appear in printed and displayed reports:

vThe number of spaces to the left of each column

vThe wording of headings above the columns

vThe size of the fields in the columns

Query ignores any column formatting you specify when you send detailed output to a database file. However, if you later use that query to produce a report, the column formatting you specify is used.

Query uses the column heading (break fields only), editing, and field size that you specify for a query when you send summary-only output to a database file. Summary-only output is described in Chapter 13, “Selecting output type and output form in Query for iSeries reports”.

Column spacing in Query for iSeries reports

If you want to change the column spacing for a field, type a number from 0 through 99 to indicate the number of spaces you want to appear to the left of that field column.

Unless you change the column spacing for fields, Query puts no spaces in front of the first column and puts two blank spaces in front of all the other columns in the report. Before you specify any values, you should be familiar with the possible effects of any changes. For example, if you ask Query to put several

blanks in front of more than one field, the new width of your output might exceed the width of the print line on your printer, and your output may be truncated (that is, part of it may have dropped off). If this

happens, you could specify less space between the columns, or you could specify a Y (Yes) for line

wrapping on the Select Output Type and Output Form display (see Chapter 13, “Selecting output type and output form in Query for iSeries reports”).

Column headings in Query for iSeries reports

For each field that has a column heading defined in its field definition (such as in IDDU field definitions), that information is used by Query unless you change it. For result fields, any column headings specified on the Define Result Fields display are also used by Query. For fields that have no headings defined, the field names are used as the headings (in heading line 1), unless *NONE is specified in heading line 1. If you specify *NONE, it must begin in the first position of the first heading line and must be all uppercase letters. The remainder of the heading must be blank.

© Copyright IBM Corp. 2000, 2002

119

Page 131
Image 131
IBM SC41-5210-04 Specifying report column formatting in Query for iSeries, Column spacing in Query for iSeries reports