000100 Identification Division. 000200 Program-Id. ED02PGM. 000300*---------------------------------------------- 000400* Exercise 2. 000500*---------------------------------------------- 000600 Data Division. 000700 Working-Storage Section. 000800 Copy DFHAID. 000900 01 WS-Commarea. 001000 05 WS-Times Pic 99 Value 0. 001100 001200 01 Cursor-Settings. 001300 05 Cursor-Row Pic 9(04) Binary Value 0. 001400 88 Cursor-Row15 Value 1120. 001500 88 Cursor-Row16 Value 1200. 001510 88 Cursor-Row18 Value 1360. 001600 001700 01 Messages. 001800 05 Message1. 001900 10 Msg1. 002000 15 Pic X(40) 002100 Value 'Pseudoconversational program, entered'. 002400 15 Msg1-Times Pic ZZ. 002500 15 Pic X(10) Value ' times.'. 002600 05 Message2. 002700 10 Msg2. 002800 15 Pic X(80) 002810 Value 'Press Enter to continue, CLEAR to terminate'. 002901 002910 05 Message3 Pic X(80) Value Space. 002920 88 OKMsg3 Value '*** OK Enter pressed ***'. 002930 88 ErrorMsg3 Value '*** Invalid key pressed ***'. 003000 Linkage Section. 003100 003200 01 DFHCOMMAREA Pic 99. 003300 003400 Procedure Division. 003500 003510 Evaluate True 003600 When EIBCALEN = 0 003700 Perform Send-Control-Erase 003710 When EIBAID = DFHCLEAR 003720 Perform Return-CICS 003730 When EIBAID = DFHENTER 003900 Move DFHCOMMAREA to WS-Commarea 003910 Set OKmsg3 to True 004010 When Other 004011 Move DFHCOMMAREA to WS-Commarea 004020 Set ErrorMsg3 to True 004100 End-Evaluate 004110 Perform Send-Messages 004200 Perform Return-CICS-Transid 004300 . 004400*---------------------------------------------- 004500 Send-Messages. 004600*---------------------------------------------- 004700 Add 1 to WS-Times 004800 Move WS-Times to Msg1-Times 004900 005000 Set Cursor-Row15 to True 005100 Perform Place-Cursor 005200 Exec CICS 005300 Send 005400 From(Message1) 005500 End-Exec 005600 Set Cursor-Row16 to True 005700 Perform Place-Cursor 005800 Exec CICS 005900 Send 006000 From(Message2) 006100 End-Exec 006110 Set Cursor-Row18 to True 006120 Perform Place-Cursor 006130 Exec CICS 006140 Send 006150 From(Message3) 006160 End-Exec 006200 . 006210*---------------------------------------------- 006220 Send-Control-Erase. 006230*---------------------------------------------- 006240 Exec CICS 006250 Send 006260 Control 006270 Erase 006280 End-Exec 006290 . 006300*---------------------------------------------- 006400 Place-Cursor. 006500*---------------------------------------------- 006600 Exec CICS 006700 Send 006800 Control 006900 Cursor(Cursor-Row) 007000 End-Exec 007100 . 007200*---------------------------------------------- 007300 Return-CICS. 007400*---------------------------------------------- 007500 Exec CICS Send Control 007600* Erase 007700 Freekb 007800 End-Exec 007900 008000 Exec CICS 008100 Return 008200 End-Exec 008300 . 008400*---------------------------------------------- 008500 Return-CICS-Transid. 008600*---------------------------------------------- 008800 Exec CICS 008900 Return 009000 Transid(EIBTRNID) 009100 Commarea(WS-Commarea) 009200 End-Exec 009300 . 009400 End Program ED02PGM. 009500 009600