SET RUNTIMESUBVARS

Declares runtime substitution variables that are used in a calculation script.

Every runtime substitution variable used in a calculation script must be declared in the SET RUNTIMESUBVARS command. The name of a runtime substitution variable is required. Specifying a default value for the runtime substitution variable is optional. Also optional is a description of the runtime substitution variable's data type and data input limit, which is a string in the <RTSV_HINT>rtsv_description</RTSV_HINT> tag. Each runtime substitution variable declaration must end in a semicolon.

Syntax

SET RUNTIMESUBVARS
 {
   runtime_substitution_variable [= value] [<RTSV_HINT>rtsv_description</RTSV_HINT>];
 };
Parameter Description

runtime_substitution_variable

Name of a runtime substitution variable

value

(Optional) Default value of the named runtime substitution variable. The value can be expressed as a string, a constant, a member name, or a member combination.

Default values specified in the SET RUNTIMESUBVARS command can be overwritten at runtime. See “Using Runtime Substitution Variables in Calculation Scripts” in the Oracle Essbase Database Administrator's Guide.

<RTSV_HINT>rtsv_description</RTSV_HINT>

(Optional) A string that describes the data type and data input limit (for example, an integer not greater than 100) of the named runtime substitution variable. This string is not used in the calculation.

The EssGetRuntimeSubVars API retrieves all of the information (name, value, and description) that is specified in the runtime substitution variable declaration. The <RTSV_HINT> string can then be used to prompt a user to input a value at runtime or to validate input data before passing the value to the calculation script.

Notes

  • If you specify a runtime substitution variable in SET RUNTIMESUBVARS but do not use the runtime substitution variable in the calculation script, Essbase ignores the runtime substitution variable declaration.

  • If multiple runtime substitution variables have the same name but have different values, only the value of the first instance of the runtime substitution variable is used; all other subsequent values are ignored.

  • To log the runtime substitution variables that are used in a calculation script, set the ENABLERTSVLOGGING configuration setting to TRUE.

Example

In the following example, three runtime substitution variables are defined with a name and a default value; for example, the runtime substitution variable named myMarket has a value of “New York”.

SET RUNTIMESUBVARS
{
   myMarket = “New York”;
   salesNum = 100;
   pointD = "Actual"->"Final";
};

In the following example, the runtime substitution variables do not include default values. The EssGetRuntimeSubVars API can be implemented to retrieve all of the information (name, value, and description) about the runtime substitution variable. The <RTSV_HINT> string can then be used to prompt a user to input a value at runtime or to validate input data before passing the value to the calculation script.

SET RUNTIMESUBVARS
{
   myMarket <RTSV_HINT>myMarket: Input the value as a string, such as "New York"</RTSV_HINT>;
   salesNum <RTSV_HINT>salesNum: Input the value as an integer, such as 100</RTSV_HINT>;
   pointD <RTSV_HINT>pointD: Input the value as a member name or a member combination, such as "Actual"->"Final"</RTSV_HINT>;
};

See Also