Examples with SET CLEARUPDATESTATUS

These examples demonstrate different ways of using SET CLEARUPDATESTATUS in a calculation script for Intelligent Calculation of an Essbase block storage cube.

For the examples, assume a scenario using the Sample Basic database, in which the sparse dimensions are Market and Product. New York is a member on the Market dimension. Intelligent Calculation is on, which is the default.

Figure 20-1 Standard Dimensions in Sample Basic


Collapsed outline with all standard dimensions in the Sample Basic database: Year, Measures, Product, Market, and Scenario.

Example 1: CLEARUPDATESTATUS AFTER

In the following calculation script, Essbase searches for dirty parent blocks for New York along the Product dimension (for example, New York -> Colas).

SET CLEARUPDATESTATUS AFTER;
FIX("New York")
   CALC DIM(Product);
ENDFIX

As specified by the AFTER parameter, the dirty blocks are calculated and marked as clean.

Essbase does not mark the level 0 blocks as clean, because they are not calculated.

Example 2: CLEARUPDATESTATUS ONLY

In the following calculation script, Essbase searches for dirty parent blocks for New York along the Product dimension (for example, New York -> Colas).

SET CLEARUPDATESTATUS ONLY;
FIX("New York")
   CALC DIM(Product);
ENDFIX

As specified by the ONLY parameter, the dirty parent blocks are marked as clean, but are not calculated.

Essbase does not mark the level 0 blocks as clean, because they are not calculated. For example, if New York -> 100-10 is dirty, it remains dirty.

Example 3: CLEARUPDATESTATUS OFF

In the following calculation script, Essbase first calculates all the dirty blocks in the cube.

SET CLEARUPDATESTATUS OFF;
CALC ALL;
CALC TWOPASS;
SET CLEARUPDATESTATUS ONLY;
CALC ALL;

As specified by the OFF parameter, the calculated blocks remain dirty.

Essbase then calculates the two pass members along the Accounts dimension. Because the data blocks are still marked as dirty, Essbase recalculates them. Again, it does not mark the calculated data blocks as clean.

Essbase then searches for all the dirty blocks in the database and marks them as clean, as specfied by the ONLY parameter.

No more blocks are calculated by the final CALC ALL command, because they are all marked clean.