MaxL Language Definition


Syntax Notes
Numbers
Terminals
Privileges and Roles
Rules for Quoting and Special Characters

Syntax Notes

The following syntax scheme applies to the creation of MaxL statements.

A MaxL statement corresponds to a sentence telling Essbase what to do with users and database objects. In this documentation, the grammar of MaxL statements is illustrated using railroad diagrams.

When issued via the MaxL Shell (essmsh), statements must be terminated by semicolons. Semicolons are used only to tell the shell when to terminate the statement; semicolons are not part of the MaxL language itself. Therefore, when issuing MaxL statements programmatically through Perl or API programs, do not terminate with a semicolon.

A token is a delimited sequence of characters recognized by MaxL as a single readable unit. Tokens may be singleton names, keywords, strings, or numbers. Names can have one, two, or three tokens, delimited by periods. The space delimiting tokens can be any white space: spaces, tabs, new lines, or blank lines.

A keyword is a sequence of alphabetic characters that is part of the MaxL grammar. Each keyword is recognized as one token. To be recognized as keywords, keywords cannot be enclosed in quotation marks. However, if you wish to use MaxL keywords outside of the grammar as terminals (for example, as database names or passwords), they must be enclosed in single quotation marks.

A terminal is something referenced in the grammar for which you provide the correct name or definition. Terminals can be names, numbers, or strings. Examples: user-name, filter-name, size-string.

A name is any string that starts with an alphabetic character, or any quoted string. Names in MaxL are used to uniquely identify databases and database objects, such as users, applications, or filters.

Names in MaxL may be one of three types:

A string is unquoted or quoted. An unquoted string can be any sequence of non-special characters. A quoted string can be any sequence of characters (special, alphabetic, or numeric) in the MaxL Alphabet, enclosed in single quotation marks ('').

A number is one kind of token which may be passed to Essbase by MaxL. To have meaning, the number must be in the correct format for the Essbase value it represents. In the MaxL grammar documentation, labels for numbers indicate whether the allowed number is positive, negative, an integer, or a real. See Numbers.

The MaxL alphabet consists of the following elements:

Element Description
Special characters Valid special characters: .   ,   ;   :   %   $   "   '   SPACE   TAB   *   +   -   =
<   >   [   ]   {   }   (   )   ?   !   /   \   |   ~   `   #   &   @   ^  

When using special characters in MaxL terminals, note the quoting rules.

Non-special characters Alphabetic characters and numbers.
Alphabetic characters Letters of the alphabet, and the underscore. [a-z, A-Z, _]
Numbers See Numbers

Numbers

Numbers in MaxL statements fit into one of the following categories.


INTEGER Zero or a positive integer. Decimals and scientific notation are permitted. Examples: 0, 1, 1000, 1.3e4
REAL Zero or a positive real number. Decimals and scientific notation are permitted. Examples: 0.0, 1, 1000, 1000.4, 13.1e-4

Terminals

Terminal Description
APP-NAME
(name)
The name of the application. Limit 8 characters.

If the name contains any allowed special characters, it must be enclosed in single quotation marks. Only the following special characters are allowed by Essbase within application names:

% (percent sign)
$ (dollar sign)
- (minus sign)
{ (open brace)
} (close brace)
( (open parenthesis)
) (close parenthesis)
! (exclamation mark)
~ (tilde)
` (accent mark)
# (pound sign)
& (ampersand)
@ (at sign)
^ (caret)

Example: Sample
AREA-ALIAS
(name)

A shorthand name used in the in the CREATE PARTITION statement for referring to an already-specified member expression that designates which areas of the databases should be partitioned.

Example:
In the create partition statement below, "foo" is an area-alias for the member expression specified in the area specification. To create area-aliases, enter the alias names after the member expression in each area specification. To specify which area is relevant when mapping members (if applicable), refer to its alias name in the mapped phrase.

In the example below, the alias name as created is shown in this color, and it specifies which area (in other words, it refers to the entire member expression string, '@IDESCENDANTS(East) @IDESCENDANTS(Qtr1)'). The alias name as referenced is shown in this color.

create or replace replicated partition sampeast.east
area '@IDESCENDANTS("Eastern Region"), @IDESCENDANTS(Qtr1)' to samppart.company at aspen as admin identified by 'password' area '@IDESCENDANTS(East) @IDESCENDANTS(Qtr1)' foo mapped foo (Year) to (Yr) update allow validate only;
Note: All area aliases used in a mapping should be associated with the target (as in the example above), and the direction of member names listed in the mapped clause should go from source to target.
AUTH-PARAMETERS
(string)
External-authentication connection parameters. If the AUTHENTICATIONMODULE setting in the server configuration file essbase.cfg file contains the full authentication parameters, then identified by AUTH-PARAMETERS can be omitted from the MaxL statement.

Valid values can be anything representing private data needed to authenticate the user with the authentication protocol. For example, in an LDAP schema, default connection parameters would be the portion of the DN (Distinguished Name) other than the user name, followed by @hostname:port_number.

Example: 'ou=Groups, dc=yahoo, dc=com@server2:389'

The parameter list must be enclosed in single-quotation marks, so that MaxL can interpret it as one string.

CALC-NAME

name1.name2.name3 (db-level calc)
OR
name1.name3 (app-level calc)
  • name1 - Application name.
  • name2 - Database name (not required for application-level calcs).
  • name3 - Calc script name.

A stored calculation.

For calculations associated with databases, three tokens are required, to indicate application and database context and the calculation name.

Example: Sample.basic.'alloc.csc'

For application-level calculations, two tokens are required, indicating application context and the calculation name. When executing application-level calculations, you must specify which database to calculate using the syntax 'on database STRING.'

Example:
  • Sample.'alloc.csc' is the application-level CALC-NAME.
  • execute calculation Sample.'alloc.csc' on database Basic; is a way to execute the application-level calculation on a database.

If any part of the name contains special characters, it must be enclosed in single quotation marks.

CALC-NAME-SINGLE
(name)

A stored calculation name that is the third token of a database-level CALC-NAME.

For example, if the full database-level calc name is sample.basic.'alloc.csc', then CALC-NAME-SINGLE is 'alloc.csc'.

If any part of the name contains special characters, it must be enclosed in single quotation marks.

CALC-SPEC-STRING
(string)
An optional Hyperion Essbase calculator-syntax specification string. Must be enclosed in single quotation marks.

Example: '@COVARIANCE (expList1, expList2)'

Use CALC-SPEC-STRING only if the function or macro needs to be returned through the API that lists functions.
CALC-STRING
(string)

A calculation string. The body of an anonymous (unstored) calculation, or the string used to specify the body of a stored calculation at create time.

Because calculations are terminated with a semicolon, and semicolons are special characters to MaxL, CALC-STRING should be enclosed in single quotation marks.

Example: CALC DIM(Year, Measures, Product);

COLUMN-WIDTH
(number or default)
A number between 8 and 80 representing character-width of columns; or, the keyword default, representing 20 characters wide.
Examples:
80    default   24
COMMENT-STRING
(string)
A string of user-defined informational text. If the string contains special characters, it must be enclosed in single quotation marks.
Example: 'This is a comment.'
DBS-EXPORT-DIR
(string)

Suffix for the name of a database directory to contain export files, to be created (upon export lro) on the server or client as $ARBORPATH/app/appname-dbname-suffix.

After export lro, the directory contains file-type LRO binary files (if applicable to the database), and the LRO-catalog export file with file-extension .exp.

For example, if for a Sample.Basic export, DBS-EXPORT-DIR is given as lros, then the sample-basic-lros directory is created in the $ARBORPATH/app directory structure. The sample-basic-lros directory contains file-type LRO binary files and the LRO-catalog export file 'sample-basic-lros.exp'.

Notes:

  • MaxL creates exactly one export directory; it does not create a directory structure.
  • If the specified export directory already exists, the export LRO statement will fail. This is a safeguard against overwriting existing export directories.
DBS-NAME
(name1.name2)
  • name1 - The name of the application containing the database. Limit 8 characters.
  • name2 - The name of the database. Limit 8 characters.

The name of a database. Two tokens are required, to indicate application context.

If the name contains any allowed special characters, it must be enclosed in single quotation marks. Only following special characters are allowed by Essbase within database names:

% (percent sign)
$ (dollar sign)
- (minus sign)
{ (open brace)
} (close brace)
( (open parenthesis)
) (close parenthesis)
! (exclamation mark)
~ (tilde)
` (accent mark)
# (pound sign)
& (ampersand)
@ (at sign)
^ (caret)

Example: Sample.basic
DBS-STRING
(string)

The second token of DBS-NAME. Limit 8 characters.

If the name contains special characters, it must be enclosed in single quotation marks.

Example: basic

EXPORT-DIR
(string)

The exact name of a directory in $ARBORPATH\app where LRO-catalog information was exported using export lro. Give only the directory name; do not give the full path. Must be enclosed in single quotation marks. The typical format is appname-dbname-suffix.

Example: 'sample-basic-out'

FILE-NAME
(string)
A file name or an absolute path to a file. If the string contains special characters, it must be enclosed in single quotation marks. If the file path contains a backslash ( \ ), it must be preceded with another backslash ( \\ ) to be interpreted correctly by the MaxL Shell. Note: Variables in file paths are not supported on Windows at this time.
Examples:
  • file01
  • 'D:\\filename'
  • '$ARBORPATH/errors.txt'
  • '/homes/fiona/scriptfile.msh' (UNIX file path)
FILTER-NAME
(name1.name2.name3)
  • name1 - Application name.
  • name2 - Database name.
  • name3 - Filter name.

The name of a security filter. Three tokens are required, to indicate application and database context.

Example: Sample.basic.filt1
FULL-EXPORT-DIR
(string)

Full path for the name of a directory for LRO export files, to be created (upon export lro) anywhere on the client or server.

After export lro, the directory contains file-type LRO binary files (if applicable to the database), and the LRO-catalog export file named in the format directoryname.exp.

For example, if for a Sample.Basic export, FULL-EXPORT-DIR is given as home/temp/lros, then the lros directory structure is created under home/temp if home/temp exists. The lros subdirectory contains file-type LRO binary files and the LRO-catalog export file 'lros.exp'.

Notes:

  • MaxL creates exactly one export directory; it does not create a directory structure. In the above example, if the home/temp directory structure exists, MaxL creates the lros directory as a subdirectory of home/temp, but if home/temp does not exist, MaxL will not create home/temp/lros.
  • If the specified export directory already exists, the export LRO statement will fail. This is a safeguard against overwriting existing export directories.
  • On Windows, use double backslashes ( \\ ) to represent backslashes in file paths. This is so that the MaxL Shell can interpret the second backslash literally, and not as an escape sequence. Example: 'C:\\temp\\lros'
FUNC-NAME

name1.name2
(local)
OR
name2 (global)
  • name1 - Application name.
  • name2 - Function name.

The name of a custom-defined Hyperion Essbase function. Using one token indicates a global function. For a local (application-level) function, use two tokens.

The name of a custom-defined function is a unique string that begins with a letter or a @, #, $, _ symbol. The name can include alphanumeric characters or the aforementioned symbols. It is recommended that you start a function name with @.

Any token of the name that contains special characters must be enclosed in single quotation marks.

Example:
  • Sample.'@COVARIANCE' (a local function)
  • '@COVARIANCE' (a global function)
GROUP-NAME
(name)
The name of the group. Group names must start with a letter or a number. If the name contains special characters, it must be enclosed in single quotation marks.
Example: Sales
HOST-NAME
(name)
The name of a computer.
Example: Aspen
IMPORT-DIR
(string)

A string representing the full path to the directory used in the export lro statement.

Note: If importing lros from a server directory (using from server syntax of import lro), you can give just the full directory name instead of the full path, as specified by EXPORT-DIR.

The string must be enclosed in single quotation marks.

Examples:

  • 'c:\\hyperion\\essbase\\app\\sample-basic-lros'
  • 'c:\\hyperion\\essbase\\client\\sample-basic-lros'
  • 'home/exports/temp/sample-basic-lros'
  • "'$ARBORPATH\\app\\sample-basic-lros'"
    Note: If variables are used, the single-quoted string should also be enclosed in double quotes. On Windows, backslash characters used in paths must be doubled so that they are interpreted literally rather than as escape characters.)

For information about how IMPORT-DIR is created, see the grammar and definitions for export lro.

JAVACLASS.METHOD
(string)
The java class and the method representing the custom-defined function. Must be a fully qualified java method name and signature, enclosed in single quotation marks.
Example: 'com.hyperion.essbase.calculator.Statistics.covariance'
For Java code examples and MaxL registration scripts for custom-defined functions, see Custom-Defined Calculation Function Examples
LOCATION-ALIAS-NAME
(name1.name2.name3)
  • name1 - Application name.
  • name2 - Database name.
  • name3 - Location alias name.

The name of a location alias referencing another database.
Example: Sample.Basic.EasternDB

MACRO-NAME

name1.name2 (local)
OR
name2 (global)
  • name1 - Application name.
  • name2 - Macro name.

The name of a custom-defined Hyperion Essbase macro. Macro names are a shorthand way to refer to macro expansions.

The name of a macro is a unique string that begins with a letter or a @, #, $, _ symbol. The name can include alphanumeric characters or the aforementioned symbols. It is recommended that you start a macro name with @. Although macros must have unique names within a given application, a global macro and a local macro can share the same name. However, the local macro takes precedence.

To create or refer to a local (application-level) macro, use the double name (for example, Sample.'@JSUM').

Any part of the name that contains special characters must be enclosed in single quotation marks.

Examples:
  • Sample.'@COUNTRANGE' - Application-level (local) macro name without a signature, meaning that there are no restrictions on its arguments.
  • Sample.'@COUNTRANGE(Any)' - Same as Sample.'@COUNTRANGE'. Once registered for the application, @COUNTRANGE can take any arguments.
  • '@JCOUNTS' - System-level (global) macro name.
  • '@JCOUNTS(single,group)' - Same as '@JCOUNTS', but with a signature restricting its arguments.
For more information about macro signatures (input parameters), see Custom-Defined Macro Input Parameters
MACRO-EXPANSION
(string)
Extended definition of the macro, to be substituted in wherever the registered macro name is referenced in a calculation. If the string contains special characters, it must be enclosed in single quotation marks.
Example: '@COUNT(SKIPMISSING,@RANGE(@@S))'
For more information, see Custom-Defined Macros.
MEMBER-EXPRESSION
(string)

Outline member specification of members from one or more dimensions, member combinations separated by commas, or member sets defined with functions. Must be enclosed in single quotation marks.
Example: '@ANCESTORS(Qtr2)'.

If MEMBER-EXPRESSION contains MEMBER-NAMES that begin with numbers or contain special characters, then enclose those member names in double quotation marks, and the entire MEMBER EXPRESSION in single quotation marks. For example:

  • create or replace filter demo.basic.numfilt no_access on '"2"';
  • '@DESCENDANTS("Eastern Region"), @CHILDREN(Qtr1)'

MEMBER-NAME
(name)
The name of a database outline member.

If the name contains special characters, it must be enclosed in single quotation marks.
Examples:

  • Jan
  • 'New York'

If MEMBER-NAME is part of MEMBER-EXPRESSION and MEMBER-NAME begins with a number or contains special characters, enclose MEMBER-NAME in double quotation marks and enclose MEMBER-EXPRESSION in single quotation marks.

MODULE-STRING
(string)
The name of the authentication module. Can be any string. Must be enclosed in single quotation marks. Supported modules are Lightweight Directory Access Protocol (LDAP) and Microsoft Active Directory. Suggested acronyms to use for MODULE-STRING are:
  • LDAP
  • MSAD
NEW-ALIAS-NAME
(name)
The name of a new location alias you are creating from the current database to reference a remote database.
Example: EasternDB
PASSWORD
(string)
A user's password. If the string contains special characters, it must be enclosed in single quotation marks.
ROLE-NAME
(name)
The name of the security role. For more information, see Privileges and Roles.
Example: designer
SESSION-ID
(number)
The unique session ID. This ID can be used to logout a user session, or kill the current request in that session.
Example: 3310545319
SIZE-STRING
(number units)
OR
(number)
  • number - Any positive number. Decimals and scientific notation are permitted. Whitespace between number and units is optional.
  • units - One of the following: b, kb, mb, gb, tb (case-insensitive).
    If units are unspecified, bytes are assumed.
Examples:
51040b  51040 b  11MB  11000kb  12.34gb 1234e-2gb
UNIQUE-VOL-NAME
(name1.name2.name3)
  • name1 - Application name.
  • name2 - Database name.
  • name3 - Disk volume name.

The unique name of the disk volume definition. Unlike the name used when the disk volume definition was created (VOLUME-NAME), the unique disk-volume name must be a triple. The first two parts of the name specify application and database context. The third part of the name, on Windows, is a drive letter. On UNIX, it is a path to the Essbase directory.

If any part of the name contains special characters, that part must be enclosed in single quotation marks.
Examples:
sample.basic.'vol3/hyperion/essbase'
sample.basic.c
.

If a Windows file path is used which contains a backslash ( \ ), it must be preceded with another backslash ( \\ ) to be interpreted correctly by the MaxL Shell. If variables are used, enclose the single-quoted string in double quotes so that the MaxL Shell knows to expand the variables.
Example:
sample.basic."'$ARBORPATH\\diskvol_area'"

USER-NAME
(name)
The name of the user. If the name contains special characters, it must be enclosed in single quotation marks. User names can contain any characters except for the backslash (\). User names must begin with a letter or a number.
VARIABLE-NAME
(name)

The name of the substitution variable. The name can only contain alphanumeric characters and the underscore (a-z A-Z 0-9 _).

Example: curmonth

VOLUME-NAME
(name)

The name of the disk volume. On Windows, a drive letter. On UNIX, a path to the Essbase directory.

If the name contains special characters, it must be enclosed in single quotation marks.

Example: 'vol3/hyperion/essbase'.

If a Windows file path is used which contains a backslash ( \ ), it must be preceded with another backslash ( \\ ) to be interpreted correctly by the MaxL Shell. If variables are used, enclose the single-quoted string in double quotes so that the MaxL Shell knows to expand the variables.
Example:
"'$ARBORPATH\\diskvol_area'"

Privileges and Roles

Essbase system privileges are indivisible database access types. In MaxL, privileges are grouped together to form permission-sets called roles. With the exception of create_user and create_application, privileges themselves are not grantable using MaxL; you typically grant roles, which are the equivalent of privilege levels. The scope of a role can be the system, the application, or the database.

While one privilege does not imply another, roles are hierarchical. The following table illustrates the Essbase system privileges that are contained in each MaxL system role.

MaxL System Role Essbase System Privileges
read write calculate design
database
create
database
start
application
design
application
create/drop
application
create/drop
user
no access . . . . . . . . .
read . . . . . . . .
write . . . . . . .
execute . . . . . .
designer (database) . . . . .
designer (application) . .
supervisor

System-Level System Privileges

The following privileges apply at the system level. These privileges are built-in; they do not apply to any specific application or database. They are not included in any role except for the role of supervisor.


create_application Ability to create and delete applications.
create_user Ability to create and delete users and groups.

System-Level System Roles

System-level system roles are applicable to the Hyperion Essbase system. The following roles have a system-wide scope:


no_access No access to the system.
supervisor Full access to the entire system, including other supervisors.

Application-Level System Roles

Application-level system roles are applicable to a Hyperion Essbase application. The following roles may have an application-wide scope:


no_access No access to the application or any databases within it.
designer Designer access to the application and any databases within it. Designer access means ability to create, delete, and modify databases within the application, in addition to having Read, Write, and Execute access for that application.

Database-Level System Roles

Minimum Database Permissions

Database-level system roles are applicable to Hyperion Essbase databases. The following roles have a database-wide scope and are available when assigning minimum database permissions:


no_access No access to the database (if assigned using alter database) or to any databases in the application
(if assigned using alter application).
read Read-only access to the database (if assigned using alter database) or to all databases in the application
(if assigned using alter application). Read access means ability to view files, retrieve data values, and run report scripts.
write Write access to the database (if assigned using alter database) or to all databases in the application
(if assigned using alter application). Write access means ability to update data values, in addition to having Read access.
execute Calculate access to the database (if assigned using alter database) or to all databases in the application
(if assigned using alter application). Calculate access means ability to update data values, in addition to having Read and Write access.
designer Designer access to the database (if assigned using alter database) or to all databases in the application
(if assigned using alter application). Designer access means ability to modify database outlines, in addition to having Read and Write access.

Database Roles Grantable to Users and Groups

The following database-level system roles are available for granting to users and groups:


no_access No access to the database.
read Read-only access to the database. Read access means ability to view files, retrieve data values, and run report scripts.
write Write access to the database. Write access means ability to update data values, in addition to having Read access.
designer Designer access to the database. Designer access means ability to modify database outlines, in addition to having Read and Write access.

Filter Roles

The following subset of database-level system roles may be granted or revoked using filters.


no_access No access to the specified data object.
read Read-only access to the specified data object. Read access means ability to view files, retrieve data values, and run report scripts.
write Write access to the specified data object. Write access means ability to update data values, in addition to having Read access.

Quoting and Special Characters Rules for MaxL Language

These rules apply to terminals of MaxL statements; for example, USER-NAME or FILE-NAME. Rules for MaxL Shell also apply.

Tokens enclosed in single quotation marks
Use of backslashes
Use of apostrophes
Use of dollar signs

Tokens enclosed in single quotation marks

Contents are preserved as literal, except for backslash. One backslash is ignored; two are treated as one. Apostrophe must be escaped using backslash (\').

Example: export database sample.basic data to data_file 'D:\\export.txt';
Result: Exports data to D:\export.txt.

Example: create user 'O'Brian' identified by 'password';
Result: Error.

Example: create user 'O\'Brian' identified by 'password';
Result: User O'Brian is created.

Use of backslashes

Ignored unless preceded by another backslash (the escape character). Must use single quotation marks around the token containing the two backslashes.

create application 'finance\\budget';
Result: Application finance\budget is created.

Example (Windows):

  export database sample.basic using report_file 
  'Essbase\\App\\Sample\\Basic\\asym.rep' 
  to data_file 'c:\\home\\month2.rpt';
  

Result: The Windows file paths are interpreted correctly as Essbase\App\Sample\Basic\asym.rep and c:\home\month2.rpt.

Use of apostrophes (single quotation marks)

Syntax error returned, unless preceded by a backslash (the escape character) and enclosed in single quotation marks.

Example:create user 'O\'Brian' identified by 'password';
Result: User O'Brian is created.

Note: Use sparingly. Apostrophes are permitted by Essbase in user and group names, but not in application or database names.

Use of dollar signs

Syntax error returned, unless preceded by a backslash (the escape character) and enclosed in single quotation marks. Dollar signs ($) intended literally need to be escaped by the backslash so that they are not considered variable indicators.

Example:create application '\$App1';
Result: Application $App1 is created.

Copyright 1991-2002 Hyperion Solutions Corporation. All rights reserved.