14 22 5 Special Template Variable Notes

LANSA Technical

14.22.5 Special Template Variable Notes

Application templates may contain special variables. These special variables, used in both Application Templates Command and RDML Commands, will be replaced by their corresponding value(s). These values may be derived as the result of other Application Template commands. For example, @@QUESTION will create a variable @@CANSnnn or @@NANSnnn which may be subsequently used in an @@IF command or an @@COMMENT command; @@GET_FILS will create file variables; @@MAK_LSTS will create list variables; etc.

Note that some RDML commands will not be accepted by the IBM CL syntax checker when they contain these special variables. They must be forced to accept the commands, and the SEU editor must also be forced to update with errors. An example of this is:

GROUP_BY NAME(#PANELDATA) FIELDS(@@LST03)

 

After executing an application template containing this RDML command, and assuming list number 3 contains selected fields, an RDML command will be generated as follows:

GROUP_BY NAME(#PANELDATA) FIELDS((#EMPNO *OUTPUT) #SURNAME +

         #ADDRESS1 #ADDRESS2)

 

which is quite valid.

Take care not to code the original RDML command in the application template as in the following example:

GROUP_BY NAME(#PANELDATA) FIELDS((#@@LST03))

 

as this will generate an invalid RDML command.

It is absolutely essential that all application templates, which include special variables contained in RDML commands are thoroughly tested to ensure that the correct RDML command will be generated by the application template.