Using Predefined Velocity Variables

Predefined Velocity Variables

Here are the predefined Velocity variables:
The operating system for the SAS server.
The version of the SAS server.
The Java object for the Apache Velocity MathTool. For more information, see Floating Point Math.
This tool holds a Java object that provides common utility methods for the common task models. For more information, see Common Utilities for CTM Writers.

Floating Point Math

Using the MathTool from Apache Velocity, mathematical expressions can be evaluated in the Velocity context. For example, you can convert a double value to an integer by using the intValue() method. For more information, see the MathTool Reference Documentation at
This example shows how to use mathematical expressions in the Velocity template. $PCT contains a value between 1 and 100.
   <Options name="PCT" defaultValue="10" inputType="inputtext">Value used 
      in the equation</Option>
#if ($PCT)
#set ($OUTCALC = 1 - ($MathRool.toDouble($PCT)/100))
$MathTool.roundTo(2, $OUTCALC)