The CCI Connector sample application

The CCI Connector sample is a relatively simple application that shows how to code the CCI APIs directly. It illustrates how to:
  1. Look up a previously-published connection factory in a JNDI namespace
  2. Use the CCI Connector for CICS® TS to call a CICS server program
The sample consists of:
The sample works like this:
  1. A user starts the application by running the CCCI transaction from a CICS terminal.
  2. The CICS Java program, CICSCCISample (DFJ$CCIC), is started. The Java program:
    1. Asks the user to input a sequence of random, unsorted, decimal numbers
    2. Does a JNDI lookup of the name server, to obtain a CICS connection factory
    3. If a connection factory has not been published to the name server, creates one programatically
    4. Uses the connection factory to create a connection to CICS
    5. Creates an Interaction object from the Connection object, and sets the properties of the interaction (including the name of the target program) by means of an ECIInteractionSpec object
    6. Uses the Interaction.execute method to link to the COBOL program, DFH$0CCIS, passing as input (in a custom Record object) the user's sequence of unsorted numbers, plus the ECIInteractionSpec object
  3. The COBOL program sorts the numbers into ascending order and returns the sorted sequence in its output COMMAREA.
  4. The Java program retrieves the COBOL program's output from the output Record object and displays the sorted list on the user's terminal.

Figure 1 shows the components of the sample application.

Figure 1. Overview of the CCI Connector sample application. The main elements of the sample are a CICS Java program and a CICS COBOL server program. The Java program uses the CCI Connector for CICS TS to link to the COBOL server program. The CICS connection factory can be published to either a COS Naming Server or an LDAP name server.
The picture shows a Java program and a COBOL program running in a CICS TS region. The Java program links to the COBOL program through the CCI Connector for CICS TS. Also in the same z/OS operating system is a name server. The Java program has performed a JNDI lookup on the name server, to obtain a CICS connection factory.