Template Special Variables


Application templates may contain special variables. Special variables are predefined template variables whose values are assigned by LANSA or by template commands. These variables are used by template commands and can be substituted into RDML when the template executes. In this respect, special variables are similar to a LANSA system variable where the value of the variable is set by executing a program (a template command).

Special variables are used in both application templates commands and RDML commands. For example:

@@QUESTION PROMPT(‘Actual test condition…’)


IF COND(‘@@CANS002’)


The user is requested to enter a description of the test condition to be used in an RDML command. The user’s reply is stored in a special variable @@CANS002. The value of @@CANS002 will be substituted into the RDML IF command.

There are four basic groups of special variables:

·         general variables

·         question and answer variables

·         file variables

·         list variables.

Special variables play a very important role in templates as they provide a means of accessing and manipulating information from the template commands.