Enables you to embed HTML into a COBOL CGI program for output to a Web browser via the EHTML preprocessor.
EXEC HTML [htmloutput] [copy "file.htm"] END-EXEC
EXEC and HTML must be on the same line.
Do not specify EXEC HTML in a copybook that is used by a COPY ... REPLACING statement. Similarly, do not place an EXEC HTML statement in the scope of a REPLACE statement. Using EXEC HTML statements in either of these ways results in unexpected behavior and syntax errors.
The EHTML preprocessor does not validate or parse your HTML markup - it just outputs it directly to the Web server that started the CGI program.
With fixed format COBOL source code, the EHTML preprocessor treats column 8 as a virtual column 1 when outputting embedded HTML. This simplifies use of the HTML <PRE> tag. However, if you include a copybook with an extension of .htm, the preprocessor treats the copybook as free format source. You can override this behavior with the preprocessor directive, NOAUTOFORMAT.
Optionally, you can output variable data from your COBOL program by coding substitution markers into your embedded HTML markup.