IBM SC41-5210-04 Server User Manual


 
v 0 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:
v An all-blank Dec column identifies a fixed-length SBCS character field
v V means variable-length
v J means DBCS-only
v O means DBCS-open (mixed)
v E means DBCS-either
v G means DBCS-graphic
v L means Date
v T means Time
v Z 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