IBM SC41-5210-04 manual Omitting fields from a Query for iSeries report

Models: SC41-5210-04

1 294
Download 294 pages 6.42 Kb
Page 133
Image 133

v0 through 9 (single-precision) or 0 through 17 (double-precision) for floating-point fields

For date, time, timestamp and DBCS fields, you cannot change the length to anything but 0, which excludes the field from the report.

For numeric fields, if you increase or decrease the value in Dec, you should increase or decrease the value in Len the same amount. If you change the value in Len or Dec but decide you want to use the original field definition value, blank out the number you typed. If there is a value in the Len or Dec column for the same field, you must blank it out also. If you blank out the values, the original length and decimal values are used in the report.

The length and the number of decimal positions first shown for each numeric field from a file is the same as defined in the field definition. The length and the number of decimal positions first shown for each result field is the number that Query calculates for you, or is the number that you typed in the Len and Dec columns on the Define Result Fields display.

For numeric fields, the number in the Dec column indicates the number of positions to the right of the decimal point.

For non-numeric fields, the type of field is shown in the Dec column and cannot be changed:

vAn all-blank Dec column identifies a fixed-length SBCS character field

vV means variable-length

vJ means DBCS-only

vO means DBCS-open (mixed)

vE means DBCS-either

vG means DBCS-graphic

vL means Date

vT means Time

vZ means Timestamp

Changing the Dec value affects only how the field appears in your query output. The actual value is not changed in the field definition. If you want to change the actual number of decimal positions for a result field, you should make the changes on the Define Result Fields display rather than at this time.

For numeric fields, you can type your own value (0 through 31) for decimal positions, but you must not enter a value for Dec that is greater than the length of the field.

Omitting fields from a Query for iSeries report

You can create different versions of the same basic query output by selecting all of the possible fields you might want to include when you select and sequence fields, and then omit certain fields during the formatting processing by entering a length of zero on the Specify Report Column Formatting display. Each of these versions can be saved and run as separate queries.

You may also want to use a field for sorting or for a report break, but not want it to appear in the query report. If you change the field length (Len prompt) to zero on the Specify Report Column Formatting display, the field is not printed, displayed, or used for summary output sent to a database file. The field is still used for sorting, record selection, report breaks, and break text insert (see the appropriate Chapters for details).

If you type a zero in the Len column, and there is a number in the Dec column for the same field, you must also enter a zero for the Dec column.

Chapter 10. Specifying report column formatting in Query for iSeries 121

Page 133
Image 133
IBM SC41-5210-04 manual Omitting fields from a Query for iSeries report