DFHDHTL - program template prolog and epilog macro

The DFHDHTL macro is used to generate the prolog and epilog for document templates contained in a CICS® program (with the attribute PROGRAM in the DOCTEMPLATE resource definition).

These templates are defined as occupying the area of a load module between its entry point and the end of the module. However, if the source of the template program does not generate an exact multiple of eight bytes, the linkage editor or binder might insert spurious binary characters, which have an unpredictable effect when transmitted to a Web browser. The DFHDHTL macro helps to ensure that the template load module is always an exact multiple of eight bytes.

The prolog created by TYPE=INITIAL generates a module eyecatcher by invoking a user-specified macro (defaulting to DFHVM), and a new location counter (LOCTR) which will track the body of the template.

The epilog created by TYPE=FINAL calculates the length of the template so far, and if it is odd, generates a single blank character. This ensures that the entry point is on a halfword boundary. The epilog then rounds up the module size by reverting to the original LOCTR of the prolog, and generating sufficient characters before the entry point to make the module length a multiple of eight bytes.

Read syntax diagramSkip visual syntax diagramDFHDHTL TYPE=INITIAL,ENTRY= entryname,PROLOG= macroname,LOCTR= label
Read syntax diagramSkip visual syntax diagramDFHDHTL TYPE=FINAL,CRLF=NOYES
TYPE={INITIAL | FINAL}
Specifies whether a prolog (INITIAL) or an epilog (FINAL) is to be generated.
ENTRY=entryname
Specifies the label for the entry of the module. This is the point at which the template starts.
PROLOG=macroname
Specifies a macro to be invoked to generate module identification data in the prolog. The default is DFHVM.
LOCTR=label
Labels the internally generated location counter (LOCTR) statement which separates the generated template from the prolog code. The default is an internally generated name.
CRLF=NO | YES
Specifies whether the epilog code is to terminate with a closing CRLF (carriage return line feed). The default is NO.