Testing the SSL scenario

Set the environment variables then test the scenario by starting CICS® Transaction Gateway and sending an ECI request to the CICS server.

Set the environment variables

If you have not already done so, you must set the Java™ CLASSPATH environment variable so that the ctgclient.jar and ctgsamples.jar files can be found.

To set the CLASSPATH environment variable:
  1. Open a command prompt window and go to the directory where the Java keystore file is located.
  2. Set the Java CLASSPATH environment variable by issuing the set CLASSPATH command, for example:
    set CLASSPATH=<install_path>\classes\ctgclient.jar;<install_path>\classes\ctgsamples.jar;%CLASSPATH%

Send an ECI request to CICS

When you send an ECI request from the Java client application EciB1 specifying the ssl:// protocol, an SSL handshake between the Java client and the Gateway daemon is attempted. When server authentication, and if configured, client authentication have been successful, the Gateway daemon lists the available CICS servers to forward the ECI request to. When you have selected your CICS server, the CICS application EC01 returns the current date and time.

The source for the EciB1 application is located in the samples folder, for example:
To test the scenario:
  1. Start CICS Transaction Gateway.
  2. Send the ECI request to the CICS server by issuing a Java command that has the following format:
    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://server.company.com 8573 myclientkeyring.jks MyPassword
  3. The command returns a list of CICS servers, for example:
    CICS Servers Defined:
             1. CICSA -CICS V4.1 Server
    Choose Server to connect to, or q to quit:
  4. When prompted, type the number of the CICS server to which you want the ECI request sent.
The CICS server returns the current date and time, for example:
Program EC01 returned with data:-

        Hex: 32382f30312f31302031353a33323a34360
        ASCII text: 28/01/10 15:32:46
You have now successfully completed the scenario.