processHtmlString
Process the HTML code contained in an alphanumeric variable, replacing items delimited by %% characters with the corresponding COBOL data item.
General format
boolean processHtmlString (string, params)
Syntax rules
1. string is an alphanumeric data item or literal.
2. params is a level 01 data item for which the IS IDENTIFIED clause has been used.
General rules
1. params child variable identifiers are searched for in the string text inside the delimiters '%%' (or prefixed by colon, depending on the iscobol.http.value_prefix_colon (boolean) setting).
2. The method returns true if the operation is successful and false otherwise: in the latter case an error message will be included in the HTML output.
Example
The following COBOL program will display an HTML output whose text is “This output has been generated by isCOBOL”:.
       CONFIGURATION SECTION.
       REPOSITORY.
          CLASS WEB-AREA AS "com.iscobol.rts.HTTPHandler"
          .
       WORKING-STORAGE SECTION.
       01  params identified by "_".
           03 identified by "cobolname".
              05 cob-name pic x any length.
 
       LINKAGE SECTION.
       01 LNK-AREA OBJECT REFERENCE WEB-AREA.
 
       PROCEDURE DIVISION USING LNK-AREA.
       MAIN.
           move "isCOBOL" to cob-name.
           LNK-AREA:>processHtmlString("This output has been generated by %%cobolname%%", params).