skip to main content

Appendices : HTTPHandler class (com.iscobol.rts.HTTPHandler) : Constructor and methods : processHtmlString

processHtmlString
Process the HTML code contained in a alphanumeric variable replacing items delimited by %% characters by 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 in the string text inside the delimiters '%%' (or prefixed by colon, depending on the iscobol.http.value_prefix_colon (boolean) setting).
2.
Example
The following COBOL program will display a 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.
           move "isCOBOL" to cob-name.
           LNK-AREA:>processHtmlString("This output has been generated by %%cobolname%%", params).

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left