Show TOC

Syntax documentation*CALCULATE_DIFFERENCE Locate this document in the navigation structure

Allowed uses: By Commit, MDX, SQL

*CALCULATE_DIFFERENCE = 0 | 1

The database always stores the difference between the new value and the old value. This option defines where the calculation is performed. By default (when *CALCULATE_DIFFERENCE = 1), the logic automatically calculates the difference and sends only that value to the posting engine (PC), instructing it that what it is receiving is already the difference, and no other action is required. Since the calculation of the difference takes time, if the calculation is performed directly by the Logic module at the time of executing the rules, the subsequent posting time may be reduced.

If you set the calculate_difference value to zero (0), the logic does not perform the calculation, and sends to the posting engine the desired final value. In this case, it tells the posting engine that the difference is still to be calculated, and the posting engine takes over the job. The main reason for using this instruction is so the debug file shows the values exactly as you expect them to look in the application.