SET TRACE
The SET TRACE calculation command selects a particular cell to be traced during the execution of member formulas in an Essbase calculation script.
Description
This command enables you to trace multiple data cells. Additionally, you can trace sections of calculation scripts by using a combination of SET TRACE mbrList
and SET TRACE OFF
. However, to use SET TRACE command, you must execute the calculation script outside of Smart View, using Cube Designer or Jobs.
Syntax
SET TRACE mbrList| OFF;
Parameters
Notes
-
Trace output is logged to
calc_trace.txt
in the cube directory. This file is overwritten when the next calculation script is run or verified.Use SET TRACEID to create a unique trace output log file that is not overwritten.
-
SET TRACE commands are ignored if the CALCTRACE configuration setting is set to OFF.
-
Even if the CALCTRACE configuration setting is ON, SET TRACE commands are ignored when calculation scripts are executed from Smart View.
Example
In the following example, the script traces the calculation of "Actual," "Opening Inventory," and "Ending Inventory" for Cola in New York for the months of January to March:
SET TRACE (@CHILDREN("Qtr1"), "Cola", "New York", "Actual", "Ending Inventory");
FIX(@LEVMBRS("Year",0), "Cola", "New York", "Actual")
"Opening Inventory" (
IF(NOT @ISMBR("Jan"))
"Opening Inventory"=@PRIOR("Ending Inventory");
ENDIF
"Ending Inventory" = "Opening Inventory" + "Additions" - "Sales";
)
ENDFIX
The tracing output from the above script is:
Tracing cell: [100-10][New York][Actual][Jan][Ending Inventory] (Cell update count: 1)
Previous value: #MI
Dependent values:
[100-10][New York][Actual][Jan][Opening Inventory] = 2101.00
[100-10][New York][Actual][Jan][Additions] = 644.00
[100-10][New York][Actual][Jan][Sales] = 678.00
New value: [100-10][New York][Actual][Jan][Ending Inventory] = 2067.00
Computed in lines: [8 - 14] using:
"Opening Inventory"(
IF(NOT@ISMBR("Jan"))
"Opening Inventory"=@PRIOR("Ending Inventory");
ENDIF
"Ending Inventory"="Opening Inventory"+"Additions"-"Sales";
)
Tracing cell: [100-10][New York][Actual][Feb][Opening Inventory] (Cell update count: 1)
Previous value: #MI
Dependent values:
[100-10][New York][Actual][Jan][Ending Inventory] = 2067.00
New value: [100-10][New York][Actual][Feb][Opening Inventory] = 2067.00
Computed in lines: [8 - 14] using:
"Opening Inventory"(
IF(NOT@ISMBR("Jan"))
"Opening Inventory"=@PRIOR("Ending Inventory");
ENDIF
"Ending Inventory"="Opening Inventory"+"Additions"-"Sales";
)
...
For more examples, see Tracing Calculations.