Recursive variables


A recursive variable has a name that is constructed from a combination of other variables and string literals.

A recursive evaluation is performed to determine the variable name.

Information
Example

&(&LEVEL.FLAG) is a recursive variable. Components within parentheses are evaluated first. Nested sets of parentheses are permitted and resolved by the script language interpreter to determine the variable name. Variables may be interspersed with literals to construct the variable name. For example, if &LEVEL contains the value T, &(&LEVEL.FLAG) becomes &TFLAG.

Syntax evaluation of recursive variables follows these guidelines:

  • A left and right parentheses pair indicates a new level of recursive evaluation.
  • Each left parenthesis must be preceded by an ampersand (&).
  • The number of right parentheses must match the number of left parentheses.
  • Nested evaluation conditions are permitted.
  • A right parenthesis acts as a delimiter for a variable and signals the end of a variable or a string group that is to be evaluated.
  • Quotation marks are not permitted within any part of a variable name.
  • Concatenation bars (||) are not permitted within any part of a variable name.
  • A period acts as a variable name delimiter. When the period is removed from an evaluation, variables or strings following the period are appended to the variable value.
  • A resolved variable name must conform to the conventions for script variables.
  • If any referenced variable is undefined, a null value is assigned to that variable.

Related topic



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Database Advisor for IMS 3.1