Databases Reference
In-Depth Information
• You will notice how the irst task performed is to declare the API function
in the program.
• Next, the variables are dimensioned.
• Set the Script variable to contain the actual calculation script. To simplify
matters, you can use the program to open your existing calculation script
and read it into the Script variable. A maximum length of 64KB is allowed.
• Set the Calculate variable to Yes, which for this command means to actually
calculate the data. Setting this variable to No would have Essbase validate
the calc script instead.
• Execute the EsbCalc function passing it the hCtx variable (context variable
explained later), the Calculate variable, and the Script variable. At the same
time placing the Essbase process return code into the sts variable.
• Finally, perform a loop that checks the state of the process until the
calculation script process has completed. This loop will hold up further
program executions until the calculation script has completed. The benefit of
this is that another routine in your program will not inadvertently grab data
that has not been calculated yet.
Running a Calculation Script from
Microsoft Excel
Yes, after all that, there are still a couple of ways to execute a calculation script
against your Essbase database!
Of course you would have had to assume that since Microsoft Excel is the natural
front end for an Essbase database, that there would be a way to fire off a calculation
script from it. Well, honestly, there are a couple ways you can do it.
 
Search WWH ::




Custom Search