Defines a new substitution variable and its corresponding string value.
CREATEVARIABLE variableName serverName [appName [dbName]] value
variableName | The name to give to the new substitution variable. The name must be alphanumeric and can contain a maximum of 80 characters. You can use underscores, but not spaces. |
serverName | Host name of the Analytic Server for which the variable is defined. |
appName | Optional. Name of the application for which the variable is defined. If appName is not used, in a script, empty quotes must be used to take its place. ("" ) |
dbName | Optional. Name of the database for which the variable is defined. If dbName is not used, in a script, empty quotes must be used to take its place. ("" )
|
value | The string value that corresponds to the substitution variable. The name 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 in the value string. |
CREATEVARIABLE creates a new substitution variable. If you specify only the Analytic Server host name, the variable applies to all applications and databases on the Analytic Server. If you specify the Analytic Server host name and the application name, the variable applies to all databases within the specified application. If you specify the Analytic Server host name, application name, and database name, the variable is available only within 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.
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 Analytic 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";
©2004 Hyperion Solutions Corporation. All Rights Reserved. http://www.hyperion.com |