000100 ID DIVISION. 00010000 000200 PROGRAM-ID. TRPGM84. 00020000 000300*AUTHOR. Kenneth W. Caldwell. 00030000 000400*INSTALLATION. Train-Right. 00040000 000500*DATE-WRITTEN. May 18, 2007. 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* It creates image output via a DOCUMENT TEMPLATE. 00120000 001300* WEB SEND specifies the MEDIATYPE. 00130000 001400* The client is a Web Browser. 00140000 001500* 00150000 001600 DATA DIVISION. 00160000 001700 WORKING-STORAGE SECTION. 00170000 001800* Fields for the output. 00180000 001900 01. 00190000 002000 05 msg PIC X(34). 00200000 002100 05 doc-token REDEFINES msg PIC X(16). 00210000 002200 00220000 002300 LINKAGE SECTION. 00230000 002400 00240000 002500 PROCEDURE DIVISION. 00250000 002600 Main. 00260000 002700 EXEC CICS HANDLE CONDITION INVREQ(Not-Web) END-EXEC. 00270000 002800 00280000 002900*Receive-Trans-Input. 00290000 003000 00300000 003100 Process-Data. 00310000 003200 EXEC CICS DOCUMENT CREATE DOCTOKEN(doc-token) 00320000 003300 TEMPLATE('TRLOGO') 00330000 003400 END-EXEC. 00340000 003500 00350000 003600 Send-Result. 00360000 003700 EXEC CICS WEB SEND DOCTOKEN(doc-token) 00370000 003800 MEDIATYPE('image/jpeg') 00380000 003900 END-EXEC. 00390000 004000 00400000 004100 Process-Exit. 00410000 004200 EXEC CICS RETURN END-EXEC. 00420000 004300* Dummy GOBACK. 00430000 004400 GOBACK. 00440000 004500 00450000 004600 Not-Web. 00460000 004700 MOVE 'Client is not an HTTP Web Browser.' TO msg. 00470000 004800 EXEC CICS SEND FROM(msg) ERASE END-EXEC. 00480000 004900 EXEC CICS RETURN END-EXEC. 00490000