Send a message with EXEC CICS SEND TEXT ERASE
Send plain text to a terminal with EXEC CICS SEND TEXT ERASE in COBOL, which needs no BMS map, on CICS Transaction Server 6.1.
The simplest CICS program writes a line to the terminal without a screen map, using SEND TEXT. It is a good first transaction and a quick way to show a status message from a program that does not own a mapset.
WORKING-STORAGE SECTION.
01 WS-MSG PIC X(16) VALUE 'HELLO FROM CICS'.
PROCEDURE DIVISION.
EXEC CICS SEND TEXT FROM(WS-MSG)
LENGTH(LENGTH OF WS-MSG) ERASE
END-EXEC.
EXEC CICS RETURN END-EXEC.HELLO FROM CICSERASE clears the screen first, so the text appears at the top left. Without it, the text is added to what is already shown.
The data is sent as typed, and a message longer than the screen is split over pages with the terminal's paging commands, which is a reason to keep status text short. The RETURN ends the task, and the terminal stays on the screen until the user presses a key. On CICS TS 6.1 this works for 3270 terminals and for sessions through CICS Web or TN3270 gateways.