MaxL Basics: Automate Essbase Data Loads and Calculations

MaxL Basics: Automate Essbase Data Loads and Calculations

πŸ“Ž This article includes 1 downloadable practice file ↓

⏱ 3 min readUpdated 28 September 2026

MaxL is Essbase’s scripting language for administration. Instead of clicking through the console every month, you save the steps in a .mxl file and run it β€” manually or from a scheduler.

In this article
  1. A typical monthly load script
  2. What each part does
  3. Running it
  4. Try it yourself: step by step
  5. Continue learning

A typical monthly load script

/* monthly_load.mxl */
spool on to 'monthly_load.log';

login $1 identified by $2 on $3;

/* clear the month we are about to reload */
execute calculation 'FIX("Actual", "Mar") CLEARDATA "Sales"; ENDFIX' on Sample.Basic;

/* load data using a rules file, send rejected records to a file */
import database Sample.Basic data
    from server text data_file 'sales_mar.txt'
    using server rules_file 'LdSales'
    on error write to 'sales_mar_errors.txt';

/* run the calculation stored on the server */
execute calculation Sample.Basic.CalcAll;

logout;
spool off;
exit;

What each part does

  • spool writes everything to a log file β€” your audit trail.
  • $1, $2, $3 are parameters passed on the command line (user, password, server), so the script contains no passwords.
  • execute calculation ‘…’ can run an inline calc string β€” here a targeted CLEARDATA with FIX, so only March Actuals are cleared.
  • import database … using … rules_file loads the file through a load rule that maps and cleans columns.
  • on error write to keeps rejected records (e.g. unknown members) in a file you can fix and reload.

Running it

essmsh monthly_load.mxl admin_user %ESS_PWD% essbase-server

essmsh is the MaxL shell. Read the password from an environment variable or a secure vault β€” never hard-code it.

Advertisement
⚠️ Always test on a copy of the application first, and check the error file after every load: a clean-looking log with 5,000 rejected records is still a failed load.

New to Essbase? Start with Essbase explained. On EPM Cloud the equivalent automation tool is EPM Automate.

Try it yourself: step by step

  1. Download monthly_load.mxl. Replace Sample.Basic, the data file and the rules file with your application’s names.
  2. On a test server run essmsh monthly_load.mxl youruser %ESS_PWD% yourserver.
  3. Open monthly_load.log: each statement shows β€œOK/INFO” lines. Check the elapsed times.
  4. Open sales_mar_errors.txt. If it has lines, they are records Essbase rejected β€” usually a member that does not exist in the outline.
  5. Fix the outline or the rules file and re-run only the import step.

πŸ“Ž Practice files for this article

  • 🧊
    MaxL template (.mxl)The complete script with parameters instead of passwords.
    ⬇ MXL Β· 478 B

Free to use for learning. Files with macros (.bas) are plain text β€” import them with Alt+F11 β†’ File β†’ Import File, and always test on a copy.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free Β· AI can be wrong

Leave a Reply

Your email address will not be published. Required fields are marked *