Testing your scenario
To test that your scenario is configured correctly, start the CICS® Transaction Gateway and use the CICS TG Java™ sample EciB2 to call CICS server program EC01.
- To test your scenario using a valid user ID and password, issue
the following command from a command prompt on the machine on which
the CICS TG is running. In
this example command, the Gateway daemon TCP handler is listening
on the default port.
java com.ibm.ctg.samples.eci.EciB2 jgate=localhost server=CICSA prog0=EC01 commarealength=18 userid=USERID password=PASSWORD ebcdic
The ebcdic option is not required if you have set up a definition for EC01 in the DFHCNV data conversion macro on CICS.
The output from the command is as follows:
CICS Transaction Gateway Basic ECI Sample 2 Test Parameters CICS TG address : localhost:2006 Client security : null Server security : null CICS Server : CICSA UserId : USERID Password : PASSWORD Data Conversion : ASCII COMMAREA : null COMMAREA length : 18 Number of programs given : 1  : EC01 Connect to Gateway Successfully created JavaGateway Call Programs About to call : EC01 COMMAREA : extend_Mode : 0 LUW_Token : 0 Commarea : 24/02/16 18:51:34 Return code : ECI_NO_ERROR(0) Abend code : null Successfully closed JavaGateway
In the CICS job log you will see this message:
Issuing CEMT INQ TCPIPSERVICE shows that the connection count has increased to 1.
DFHIS2001 ... Client session from applid MYAPPL accepted for IPCONN IPC50889.
The IPCONN connection remains established until the connection is explicitly released, either by CICS TS or CICS TG.
CEMT INQ TCPIPSERVICE STATUS: RESULTS - OVERTYPE TO MODIFY Tcpips(SRV50889) Ope Por(50889) Ipic Nos Tra(CISS) Con(00001) Bac( 00001 ) Max( 000000 ) Urm(NO )
- If you test your scenario using an incorrect user ID and password combination, you receive an ECI_ERR_SECURITY_ERROR RC=27 message. In the CICS job log, the following message is displayed:
DFHIS1027 ... Security violation has been detected using IPCONN IPC50889 and transaction id CPMI by userid CICSUSER
- If your APPLID and APPLIDQUALIFIER specified in the ctg.ini file
do not match the APPLID and NETWORKID defined on the IPCONN, your
IPCONN connection will not be established; CICS TS will then attempt to autoinstall your
IPCONN connection. However, because autoinstall is not enabled (the
TCPIPService has URM specified as NO) the autoinstall is rejected
and your ECI request causes a program abend with an ECI_ERR_NO_CICS(-3) message.
In the CICS job log, you see
DFHIS3001 ... IPCONN autoinstall rejected after a connection was received on TCPIPSERVICE SRV50889 from host 1.23.456.789 because the TCPIPSERVICE has URM(NO)