Skip to main content

This article explains how to access CICS from Web Services and Services called from EJBs.

Problem:

How can you invoke from a Service a CICS Batch program through the use of EXEC CICS LINK in a secure Enterprise Server region?

Resolution:

See the Micro Focus product documents Chapter 10 Legacy Extension with MTO on Access to CICS Programs from Web Services and Services called from EJBs. EXEC CICS LINK launches a batch CICS program. Because Security is ON, you will have to code in the CICS LINK more options:

The CICS Transaction ID to be launched (CPMI)

The USER Id used to connect to CICS

The Password used to connect to CICS

The Group Id of the CICS used is optional

Extract of the code invoked by the Web Service which launches a CICS BATCH program

$set CICSECM(EXCI=YES)

working-storage section.

copy "DFHXCPLO.cpy".

01 ws-program pic x(10) value "ECI2OPER".

…

linkage section.

01 lk-userid PIC X(8).

01 lk-groupid PIC X(8).

01 lk-password PIC X(8).

01 MsgIn PIC X(80).

01 MSGout PIC X(80).

01 MSGCICS PIC X(80).

procedure division

using lk-userid

lk-groupid

lk-password

MsgIn

MSGout.

move MsgIn to ECI-DEMO-MESSAGE

exec cics link

program (ws-program)

commarea (DFHCOMMAREA)

TRANSID ("CPMI")

_USERID (lk-userid)

* _GROUPID (lk-groupid)

_PASSWORD (lk-password)

retcode (exci-exec-return-code)

end-exec

…

Old KB# 14523

#MFDS
#EnterpriseDeveloper