This subroutine outputs the Web page for processing result output (HTML document) to the WWW Browser after execution of the Web application. If, at this point, there is any conversion name enclosed "//COBOL//" or "//COBOL_RERAET//" in the Web page for processing result output to be output, the conversion name is converted into the conversion string registered in, such as COBW3_SET_CNV or COBW3_SET_REPEAT in advance.
How to write
CALL "COBW3_PUT_HTML" USING COBW3.
Data setting for calling
Set the file name of the Web page for processing result output.
Processing result data
None
How to specify the conversion name in the Web page for processing result output:
Enclose the string (conversion name) in the Web page for processing result output to be converted for output during execution of the Web application with "//COBOL//".
Note
"//COBOL//" cannot be specified extending over multiple lines.
× × × //COBOL//conversion name//COBOL// × × ×
The following table lists the behaviors depending on how the conversion name is specified.
How the conversion name is specified | Processing description |
---|---|
This is a //COBOL//NAME//COBOL// test. | If the conversion name "NAME" is registered, "//COBOL//NAME//COBOL//" is replaced by the registered conversion string. |
This is a //COBOL// test. | Since the conversion name specification is not correct, an error occurs. |
This is a //COBOL test. | Output as it is. |
This is a //COBOL// NAME//COBOL// test. | Since the conversion name specification is not correct, an error occurs. |
This is a //COBOL// NAME//COBOL | Since the conversion name specification is not correct, an error occurs. |
This is a //COBOL////COBOL// | Since the conversion name specification is not correct, an error occurs. |
This is a //cobol//NAME//cobol//. | Output as it is. |
Example
a.htm (Web page for processing result output)
: <BODY> <BR> Name //COBOL//GET-NAME//COBOL// <BR> :
COBOL program
: * Set the name. MOVE "GET-NAME" TO COBW3-CNV-NAME. MOVE "Fujitsu Taro" TO COBW3-CNV-VALUE. * Register conversion data in the Web page for processing result output. CALL "COBW3_SET_CNV" USING COBW3. : * Set the file name of the Web page for processing result output. MOVE "a.htm" TO COBW3-HTML-FILENAME. * Output the Web page for processing result output. CALL "COBW3_PUT_HTML" USING COBW3. :
Output results on the WWW Browser
: Name Fujitsu Taro :
How to specify the repetitive range in the Web page for processing result output:
Specify the repetitive range by using "//COBOL_REPEAT_START//" and "//COBOL_REPEAT_END//" in the location of the Web page for processing result output to be repeated during execution of the Web application. The number of times of repetition is the same as the number of registrations of the repetitive conversion string to be converted.
Repetitive range start
Write "//COBOL_REPEAT_START//" at the start location of the repetitive range of data.
Repetitive item
Write data to be output repeatedly. Write conversion names in data where to be converted for output during execution of the Web application.
If a different conversion string should be output in each repetition, enclose the string (conversion name) with "//COBOL_REPEAT//". If a fixed conversion string should be output in each repetition, enclose the string (conversion name) with "//COBOL//".
Repetitive range end
Write "//COBOL_REPEAT_END//" at the end location of the repetitive range of data.
Be sure to register the conversion string corresponding to the conversion name enclosed by "//COBOL_REPEAT//" at least once.
If no conversion name enclosed by "//COBOL_REPEAT//" is written in the repetitive item, the number of times of repetition becomes one.
"//COBOL//" and "//COBOL_REPEAT//" cannot be specified extending over multiple lines.
The line containing "//COBOL_REPEAT_START//" or "//COBOL_REPEAT_END//" indicating the start/end of the repetitive range is deleted when output to the WWW Browser. Therefore, do not write tags related to the display in the same line.
The registered number must be the same for all repetitive conversion strings written in the repetitive range. If the registered numbers are different, an error occurs because there is a conversion name that does not have enough registered data for the number of times of repetition.
If the repetitive range start "//COBOL_REPEAT_START//" is not written, no repetitive output is performed and all code other than "//COBOL//" is regarded as data for output.
If the repetitive range end "//COBOL_REPEAT_END//" is not written, the Web page for processing result output is output to the end and then an error occurs.
//COBOL_REPEAT_START// × × //COBOL_REPEAT//conversion name//COBOL_REPEAT//× × × × //COBOL//conversion name//COBOL//× × //COBOL_REPEAT_END//
The behavior depends on how the repetitive range is specified is the same as that depending on how the conversion name is specified in the Web page for processing result output.
Example
b.htm (Web page for processing result output)
: <TABLE> <TR> <TD>Name</TD> <TD>Age</TD> <TD>Company</TD> </TR> //COBOL_REPEAT_START// <TR> <TD>//COBOL_REPEAT//GET-NAME//COBOL_REPEAT//</TD> <TD>//COBOL_REPEAT//GET-AGE//COBOL_REPEAT//</TD> <TD>//COBOL//GET-OFFICE//COBOL//</TD> </TR> //COBOL_REPEAT_END// </TABLE> :
COBOL program
: PERFORM UNTIL END-FLAG="END" * Input Contents READ IN-FILE AT END MOVE "END" TO END-FLAG * Set the name. MOVE "GET-NAME" TO COBW3-CNV-NAME MOVE name TO COBW3-CNV-VALUE * Register repetitive conversion data in the Web page for processing result output. CALL "COBW3_SET_REPEAT" USING COBW3 * Set the age. MOVE "GET-AGE" TO COBW3-CNV-NAME MOVE AGE TO COBW3-CNV-VALUE * Register repetitive conversion data in the Web page for processing result output. CALL "COBW3_SET_REPEAT" USING COBW3 : END-PERFORM. : * Set the company name. MOVE "GET-OFFICE" TO COBW3-CNV-NAME. MOVE "Fujitsu" TO COBW3-CNV-VALUE. * Register conversion data in the Web page for processing result output. CALL "COBW3_SET_CNV" USING COBW3. : * Set the file name of the Web page for processing result output. MOVE "b.htm" TO COBW3-HTML-FILENAME. * Output the Web page for processing result output. CALL "COBW3_PUT_HTML " USING COBW3. :
Output results on the WWW Browser