CREATEVARIABLE

Defines a substitution variable and its corresponding string value.

Syntax

CREATEVARIABLE variableName serverName [appName [dbName]] value
ParameterDescription

variableName

Name of the substitution variable. Must be alphanumeric and can contain a maximum of 80 characters. You can use underscores, but not spaces.

serverName

Host name of the Essbase Server.

appName

Optional. Name of the application. If omitted, empty quotes must be used in a script to take its place. ("")

dbName

Optional. Name of the database. If omitted, empty quotes must be used in a script to take its place. ("")

value

The string value for the variable. Must be alphanumeric and can contain a maximum of 255 characters. It can include a null value. Do not use the & character as the leading character.

Notes

If you specify only the Essbase Server host name, the variable applies to all applications and databases on the Essbase Server. If you specify the Essbase Server host name and the application name, the variable applies to all databases within the specified application. If you specify the Essbase Server host name, application name, and database name, the variable is for the specified database.

Before you create a new variable, check the names of existing variables with the LISTVARIABLES command. It is possible to overwrite the string value of an existing variable if you create a variable with the same name as the existing variable.

Example

The following command in an ESSCMD script creates a substitution variable on the Sample Basic database, on a host computer named Bamboo. The variable is named CurQtr and has a value of Qtr1.

CREATEVARIABLE "CurQtr" "Bamboo" "Sample" "Basic" "Qtr1";

The following ESSCMD script creates a substitution variable that applies to all applications and databases on the Essbase Server named Aspen. Application and database input is left blank because the variable is system-wide; however, the empty quotation marks are still required as placeholders.

login "Aspen" "fiona" "sunflower";
CREATEVARIABLE "CurQtr" "aspen" "" "" "Qtr4";

See Also