QMF calculates the result of an aggregation function based on the actual values stored in the database table, not on the values resulting from the edit code for a column. To obtain the aggregation result using the values resulting from the edit code for a column, you must use an alternative method such as defining a new column, and then using a REXX function.
For example:
SELECT 10.5 from Q.ORG
COL1 ------ 10.5 10.5
FORM.COLUMNS MODIFIED Total Width of Report Columns: 20 NUM COLUMN HEADING USAGE INDENT WIDTH EDIT SEQ --- --------------------------- ------- ------ ----- ----- --- 1 COL1 SUM 2 6 L1 1 2 COLNEW SUM 2 10 L 1 *** END ***
format(&1,5,0)
COL1 COLNEW ------ ---------- 10.5 11 10.5 11 ====== ========== 21.0 22
Note that COLNEW has rounded values for each row and that the sum is the sum of the rounded values.
[ Previous Page | Next Page | Contents | Index ]