Creating Custom-Defined Macros

When you create a custom-defined macro, Essbase records the macro definition and stores it in a catalog of macros. You can then use the macro in formulas and calculation scripts until the macro is removed from the catalog.

You can register a custom-defined macro in the following ways:

  To create a custom-defined macro, use a tool:

Tool

Topic

Location

Administration Services

Creating Custom-Defined Macros

Oracle Essbase Administration Services Online Help

MaxL

create macro

Oracle Essbase Technical Reference

The following MaxL statement creates a local macro named @COUNTRANGE for use in the Sample application:

create macro Sample.'@COUNTRANGE'(Any) AS
'@COUNT(SKIPMISSING, @RANGE(@@S))'
spec '@COUNTRANGE(MemberRange)'
comment 'counts all non-missing values';

The following MaxL statement creates a global macro named @COUNTRANGE:

create macro'@COUNTRANGE'(Any) AS
'@COUNT(SKIPMISSING, @RANGE(@@S))'
spec '@COUNTRANGE(MemberRange)'
comment 'counts all non-missing values';