To complete this task you set the Java CLASSPATH environment variable, then issue a Java command that invokes the EciB1 sample application to send an ECI request to CICS.
The Java™ CLASSPATH environment variable identifies the location of the ctgclient.jar and ctgsamples.jar files.
export CLASSPATH=<install_path>/classes/ctgclient.jar:<install_path>/classes/ctgsamples.jar:$CLASSPATH
set CLASSPATH=<install_path>\classes\ctgclient.jar;<install_path>\classes\ctgsamples.jar;%CLASSPATH%
To send an ECI request to CICS you issue a Java command that calls the EciB1 sample application, specifying the ssl:// protocol. When you do this the Java client and the Gateway daemon attempt an SSL handshake. If server authentication is successful, and if client authentication (if configured) is successful, the Gateway daemon lists the available CICS® servers. You then select the CICS server. The CICS application EC01 then confirms the request by returning the current date and time.
The source for the sample EciB1 is located in the samples folder:
On UNIX and Linux:
/opt/ibm/cicstg/samples/java/com/ibm/ctg/samples/eci
On Windows:
C:\Program Files\IBM\CICS Transaction Gateway\samples\java\com\ibm\ctg\samples\eci
ctgadmin -a start
java com.ibm.ctg.samples.eci.EciB1 ssl://Gateway_URL
Gateway_port_number jks_filename jks_password
For
example:java com.ibm.ctg.samples.eci.EciB1 ssl://cicssrv1.company.com 8573 MyClient.jks MyPassword
CICS Transaction Gateway returns details of
the available CICS servers,
for example:CICS Servers Defined:
1. CICSA -CICS V4.1 Server
Choose Server to connect to, or q to quit:
Program EC01 returned with data:-
Hex: 32382f30312f31302031353a33323a34360
ASCII text: 28/01/10 15:32:46
You have now completed
the scenario.