Example: Increasing the decimal precision for result fields in Query for
iSeries
Figure 5 has a result field with a current maximum precision of 31 (length) and 2 (decimal positions). The
decimal precision was derived from the calculation
31-29+9-9
.
Note:
The presentation length for RESULTA a would be 31,9. You can see this by pressing
″
F13=Layout
″
.
To increase the decimal precision for the result field (RESULTA):
1. Assign each input field (PRN299A, PRN299B) directly to a result field.
2. Replace the input fields used in the original result field expression with the new result fields
(RESULT269, RESULT295).
3. Change the corresponding length (Len) and decimal positions (Dec) for the new result fields so that
the decimal precision sufficiently increases (see the previously listed formulas) for the original result
field (RESULTA).
In Figure 6 on page 191the RESULTA decimal precision is changed from 2 to 9. The new decimal
precision was derived from the calculation
31-26+9-5
.
Define Result Fields
Type definitions using field names or constants and operators, press Enter.
Operators: +, -, *, /, SUBSTR, ||, DATE...
Field
Expression
Column Heading
Len
Dec
RESULTA___ PRN299A/PRN299B__________________ ____________________
__
__
_________________________________ ____________________
_________________________________ ____________________
__________ _________________________________ ____________________
__
__
_________________________________ ____________________
_________________________________ ____________________
__________ _________________________________ ____________________
__
__
_________________________________ ____________________
_________________________________ ____________________
Bottom
_______________________________________________________________________________
Field
Text
Len Dec
PRN299A
Field with precision of 29,9
29
9
PRN299B
Field with precision of 29,9
29
9
Bottom
F3=Exit
F5=Report
F9=Insert
F11=Display names only
F12=Cancel
F13=Layout
F20=Reorganize
F24=More keys
Figure 5. Decimal Precision Using Default
190
Query for iSeries Use V5R2
Summary of Contents for ISERIES SC41-5210-04
Page 1: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Page 2: ......
Page 3: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Page 12: ...x Query for iSeries Use V5R2 ...
Page 14: ...2 Query for iSeries Use V5R2 ...
Page 32: ...20 Query for iSeries Use V5R2 ...
Page 38: ...26 Query for iSeries Use V5R2 ...
Page 44: ...32 Query for iSeries Use V5R2 ...
Page 116: ...104 Query for iSeries Use V5R2 ...
Page 122: ...110 Query for iSeries Use V5R2 ...
Page 146: ...134 Query for iSeries Use V5R2 ...
Page 150: ...138 Query for iSeries Use V5R2 ...
Page 174: ...162 Query for iSeries Use V5R2 ...
Page 178: ...166 Query for iSeries Use V5R2 ...
Page 196: ...184 Query for iSeries Use V5R2 ...
Page 198: ...186 Query for iSeries Use V5R2 ...
Page 204: ...192 Query for iSeries Use V5R2 ...
Page 205: ...Part 4 Appendixes Copyright IBM Corp 2000 2002 193 ...
Page 206: ...194 Query for iSeries Use V5R2 ...
Page 210: ...198 Query for iSeries Use V5R2 ...
Page 242: ...230 Query for iSeries Use V5R2 ...
Page 256: ...244 Query for iSeries Use V5R2 ...
Page 270: ...258 Query for iSeries Use V5R2 ...
Page 272: ...260 Query for iSeries Use V5R2 ...
Page 292: ...280 Query for iSeries Use V5R2 ...
Page 293: ......
Page 294: ... Printed in U S A SC41 5210 04 ...