000100 ID DIVISION. 00010000 000200 PROGRAM-ID. TRPGMxx. 00020000 000300*AUTHOR. 00030000 000400*INSTALLATION. 00040000 000500*DATE-WRITTEN. 00050000 000600*DATE-COMPILED. 00060000 000700* 00070000 000800*SECURITY. This program is for students of Train-Right 00080000 000900* courses ONLY!. 00090000 001000* 00100000 001100*REMARKS. This is a TCP/IP Web based program. 00110000 001200* The client is a Web Browser. 00120000 001300* 00130000 001400 DATA DIVISION. 00140000 001500 WORKING-STORAGE SECTION. 00150000 001600 01. 00160000 001700 05 html-length PIC S9(8) BINARY VALUE +1. 00170000 001800 05 html-text PIC X(2000). 00180000 001900 00190000 002000 PROCEDURE DIVISION. 00200000 002100 Main. 00210000 002200 EXEC CICS HANDLE CONDITION INVREQ(Not-Web) END-EXEC. 00220000 002300 00230000 002400 Receive-Trans-Input. 00240000 002500 00250000 002600 Process-Data. 00260000 002700 00270000 002800 Send-Result. 00280000 002900* CICS converts EBCDIC to ASCII. 00290000 003000 EXEC CICS WEB SEND FROM(html-text) 00300000 003100 FROMLENGTH(html-length) 00310000 003200 SERVERCONV(DFHVALUE(SRVCONVERT)) 00320000 003300 END-EXEC. 00330000 003400 00340000 003500 Process-Exit. 00350000 003600 EXEC CICS RETURN END-EXEC. 00360000 003700* Dummy GOBACK. 00370000 003800 GOBACK. 00380000 003900 00390000 004000 Not-Web. 00400000 004100 MOVE 'Client is not an HTTP Web Browser.' TO html-text. 00410000 004200 EXEC CICS SEND FROM(html-text) LENGTH(34) ERASE END-EXEC. 00420000 004300 EXEC CICS RETURN END-EXEC. 00430000