EPILOG PROCEDURE Declaration

The EPILOG PROCEDURE declaration enables you to designate a procedure that must be executed before exiting the block in which the EPILOG PROCEDURE declaration is contained. If an EPILOG PROCEDURE declaration exists for a block, the epilog procedure is automatically executed before exiting the containing block. The epilog procedure is not required to be invoked before exiting the containing block. However, the program can explicitly invoke an epilog procedure during execution, if you desire.

The epilog procedure functions differently if it is declared in a structure or connection block. Instead of being executed upon a block exit of the structure or connection block, epilog procedures in structure or connection blocks are executed when the block declaring the structure block variable or structure block array or connection library associated with that structure or connection block is exited. The epilog procedure of a structure block variable or array or connection library is called only if that structure block variable or array or connection library has been created. If the block declaring the structure block variable or structure block array or connection library contains an epilog procedure, the epilog for the structure or connection block is executed first.

<epilog procedure declaration>

── EPILOG PROCEDURE ──<epilog procedure identifier>── ; ───────────────►
►─<unlabeled statement>────────────────────────────────────────────────┤

<epilog procedure identifier>

──<identifier>─────────────────────────────────────────────────────────┤