You use local variables to hold dynamic data values. If your rule makes use of dynamic data values, declare the local variables that you require below the rules header.
The following example shows the rules declaration containing the rule name and argument list, the local variables RAISE and RATE, and the assignment of a value to the local variable RATE:
The declaration begins with the reserved word LOCAL and ends with a semicolon (;). If you have more than one local variable, they are separated with commas.
A local variable can be assigned an arithmetic value or a string. The maximum value or string length that can be assigned to local variables during a session is determined by the session attributes.
The scope of a local variable is the rule where it is declared and any descendant rules (rules that are below the rule in the calling hierarchy). They can be used anywhere in an action, except to supply a value for an indirect reference. For more information about indirect references, refer to
Indirect Referencing.