Embedded template commands
The CICS document handler recognizes three commands that can be embedded in a document template. The three commands that are supported are #set, #echo and #include.
Syntax for embedded template commands
<!--#command-->
The characters used to start and end the Server Side Include must be in code page 037, otherwise the command is ignored. The hexadecimal equivalents for these character sequences are X'4C5A60607B' and X'60606E'.
#echo command
This is the <!--#echo var=ASYM--> symbol.
When the template is used, the string containing the #echo command is completely replaced by the value defined for the symbol. If no symbol definition has been provided with that name, the #echo command remains in the output data. The value for the symbol can be defined by an application program, or as a default value by a #set command in the template.
#set command
<!--#set var=ASYM value='first'-->
A #set commands can override another #set command. If you include more than one #set command in the template for the same symbol name, the last command is used.
A #set command in the template is ignored if the symbol to which it applies has already been given a value using the DOCUMENT SET command. A symbol which has been assigned a value using the DOCUMENT SET command can only be changed by issuing another DOCUMENT SET command.
The #set command can be used in combination with the #echo command, or it can apply to a symbol reference that has been specified by preceding the symbol name with an ampersand (&) and terminating it with a semicolon (;).
#include command
The #include command allows a template to be embedded within another template. Up to 32 levels of embedding are allowed.
<!--#include template=
templatename-->
templatename
is
the name of the template (the 48 byte name) defined in the DOCTEMPLATE
resource
definition. The template name can also be enclosed in double quotes.