Templates can be used in two ways:
1. To create a new function:
When a new function is being defined, there is an option to generate the function using an application template. Almost every new function should be created using a template to ensure that your function follows consistent coding standards.
2. To add code to an existing LANSA object:
When modifying an existing LANSA object that contains RDML code, a template can be executed from within the editor by using the template icon on the toolbar.
Templates do not have to generate a complete program. In many cases, they are used as building blocks where you have common or repetitive code. For example, a building block template (BBPGM) can be used to produce a standard function header which can then be used with every new function. An IF/ENDIF template (BBIF) can be used to create the IF and ENDIF code in a function.
Where possible, it is recommended that you start with an application template or building block templates to create your functions.
Visual LANSA templates for component generation are prefixed with "VL_". These templates are for component use only.