0% found this document useful (0 votes)
59 views2 pages

Cics Recvtext

This document provides a sample CICS program that uses the RECEIVE and SEND TEXT commands to get input from a terminal and send messages back. The program receives user input into a data field, sends a message stating what was typed, and then sends a final message when the transaction ends successfully.

Uploaded by

sdineeshkumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views2 pages

Cics Recvtext

This document provides a sample CICS program that uses the RECEIVE and SEND TEXT commands to get input from a terminal and send messages back. The program receives user input into a data field, sends a message stating what was typed, and then sends a final message when the transaction ends successfully.

Uploaded by

sdineeshkumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 2

CIS 4808 CICS cics-recvtext.

doc
RECEIVE and SEND TEXT Command Examples Page 1 of 2

IDENTIFICATION DIVISION.
*
******************************************************************
* *
* This program illustrates the use of the RECEIVE and *
* SEND TEXT commands. *
* *
******************************************************************
*
PROGRAM-ID. Z01APGM.
*
ENVIRONMENT DIVISION.
*
DATA DIVISION.
WORKING-STORAGE SECTION.
*
01 WS-OUTPUT-MESSAGE.
05 PIC X(79) VALUE
'USER TYPED:'.
05 WS-USER-INPUT PIC X(79).
05 PIC X(79) VALUE SPACES.
05 PIC X(79) VALUE
'TRANSACTION ENDED SUCCESSFULLY'.
*
PROCEDURE DIVISION.
0-MAIN-MODULE.
PERFORM 1-GET-TERMINAL-INPUT
PERFORM 2-SEND-MESSAGES
PERFORM 3-RETURN.
*
1-GET-TERMINAL-INPUT.
EXEC CICS
RECEIVE
INTO(WS-USER-INPUT)
END-EXEC.
*
2-SEND-MESSAGES.
EXEC CICS
SEND TEXT
FROM(WS-OUTPUT-MESSAGE)
ALARM
FREEKB
END-EXEC.
*
3-RETURN.
EXEC CICS
RETURN
END-EXEC.
CIS 4808 CICS cics-recvtext.doc
RECEIVE and SEND TEXT Command Examples Page 2 of 2

This program demonstrated under CICS follows:

Z01A CICS IS LOTS OF FUN

USER TYPED: lots of fun


Z01A CICS IS LOTS OF FUN

TRANSACTION ENDED SUCCESSFULLY

You might also like