POSTFIXPARALLEL

The POSTFIXPARALLEL calculation command block for Essbase is an optional, post-processing block you can use within FIXPARALLEL...ENDFIXPARALLEL to copy temporary, thread-level THREADVAR values into longer-persisting VAR variables that you can use outside of the FIXPARALLEL block.

Syntax

POSTFIXPARALLEL ( [ varName = ACCUMULATEVAR (threadVarName ); ]* );

Parameters

varName

Name of a VAR variable to store the sum of all the thread’s values of a specified THREADVAR variable.

ACCUMULATEVAR

Keyword to add up all the thread values of a specified THREADVAR variable. The sum is then assigned to a specified VAR variable.

threadVarName

Name of a THREADVAR variable.

Notes

To copy temporary THREADVAR values into VAR variables you can use outside FIXPARALLEL, use the following task flow:

  1. Declare a VAR variable (outside of FIXPARALLEL block) to store the computed result.

  2. Declare a THREADVAR variable that you use within the FIXPARALLEL block.

  3. Use a POSTFIXPARALLEL block to copy the THREADVAR to the VAR.

Example

The following example accumulates Sales values from THREADVAR variables to a VAR variable.


/* Store computed result of four tasks */
VAR totalSalesAmnt = 0;    
/* Four tasks */
FIXPARALLEL (2, "New York", "California", "Oregon", "Florida") 
/* Accumulate results of tasks into threads */
THREADVAR s_entitySalesAmnt;  
/* Use for computation in each task */
THREADVAR entitySalesAmnt;       
/* Use/change THREADVARs within member formula blocks */
"Sales" 
  ( 
    /* Initialize variables for this task */
   entitySalesAmnt = 2;
    /* Use the THREADVARS ... */
    /* Accumulate task-data into thread-data */
    s_entitySalesAmnt = s_entitySalesAmnt + entitySalesAmnt;
  );
/* Copy computed data into longer-persisting VAR */
POSTFIXPARALLEL ( totalSalesAmnt = ACCUMULATEVAR ( s_entitySalesAmnt ););
ENDFIXPARALLEL