Enform Plus Reference Manual
Clauses
Enform Plus Reference Manual—422684-001
5-55
Combining Percentages and Subtotals
Part PCT
LOCATION Number PRICE PRICE
-------- ------ --------- ---------
H76 3102 4800.00 66.67
7301 2400.06 33.33
H57 2402 7500.00 41.67
3103 10500.00 58.33
... ... ... ...
Combining Percentages and Subtotals
The SUBTOTAL OVER clause can be combined with the PCT OVER clause, causing
Enform Plus to print the percentage the subtotal represents of the total value of the
target-item. Enform Plus does not print the value of each target-item. The
percentage values do not always exactly total 100 percent because of truncation during
division. If you execute the following query, for example, the total percentage values do
not equal 100 percent:
OPEN employee
LIST BY regnum, empname, salary PCT, SUBTOTAL OVER regnum;
PCT Clause Used With User Variable
When a numeric target-item with a PCT clause is assigned to a user variable,
Enform Plus makes the assignment to the user variable first, before the percentage is
calculated. When the user variable is referenced as a target-item in a LIST
statement or as an element within a target-item of a LIST statement, Enform Plus
uses the value of the user variable. When the user variable is referenced in a print list,
Enform Plus uses the value of the percentage for the user variable.
Restrictions
You cannot combine the PCT clause with the CUM clause.