MOVE 'TOLOWER'

TO WC-SVCNAME.

MOVE +5

 

TO WC-REQUESTCD.

MOVE 'THIS IS A TEST' TO WC-REQDATA.

EXEC CICS LINK PROGRAM('BEAPRERQ')

 

COMMAREA(WS-COMMAREA)

 

LENGTH(LENGTH OF WS-COMMAREA)

END-EXEC.

 

IF RETURNCD = 0

 

MOVE

'SUCCESSFUL CALL, RETURN DATA IS IN WC-DATA'

TO

MSG-DATA

 

ELSE

 

 

MOVE

'PROCESS ERROR OCCURRED, RETURN CODE EQUAL '

TO

MSG-DATA

 

MOVE

RETURNCD TO M-RCDE

END-IF.

 

 

EXEC CICS SEND TEXT FROM(MSG-AREA) LENGTH(47) ERASE TERMINAL FREEKB CURSOR(0)

END-EXEC.

A200-EXIT.

EXEC CICS RETURN END-EXEC.

The following is an example of a C CICS client program.

Listing 5-4 C CICS Client Program Example

long resp, resp2; unsigned short int lmsg; struct CMAREA carea;

carea.CltHdr.DataLen = strlen(sendbuf); memcpy(carea.CltHdr.SvcName, “ECHO”, 4); carea.CltHdr.RequestCd = BEA_REQUEST_RESPONSE; memcpy(carea.Request_data, “This is a test”, 14); lmsg=sizeof(carea);

/* Use the name defined during installation */

5-6

Oracle Tuxedo Mainframe Adapter for TCP - CICS User Guide

Page 94
Image 94
Oracle Audio Technologies Oracle Tuxedo manual Listing 5-4 C Cics Client Program Example