This tutorial describes how to use the J2C Java™ Bean wizard to build a simple web application
that processes a CICS® transaction
with multiple possible outputs.
This tutorial might require some optionally installable
components. If you encounter errors or cannot find user interface
options when you run the sample, ensure that you installed the appropriate
optional components:
- IBM® WebSphere® Application Server, version V7.0, V8.0, or V8.5.
To use this sample, you must have an application server installed
and configured. To verify that a server runtime environment is available,
click Window > Preferences, expand Server, and then click Installed
Runtimes. You can use this pane to add, remove, or edit installed
server runtime definitions. You can also download and install support
for a new server.
This tutorial leads you through the detailed
steps to generate a J2C application that interfaces with a CICS transaction using an External
Call Interface (ECI). The service is built from a CICS COBOL function, getCustomerInfo, which accepts a customer number. Depending on the classification
of the customer – preferred customer, regular customer, or bad customer
– the program returns different output information about the customer.

This tutorial is divided into several exercises that
must be completed in sequence for the tutorial to work properly. This
tutorial teaches you how to use the J2C Java bean wizard to connect to a CICS ECI server. While completing the exercises, you will:
- Use the J2C Java bean wizard
to create a J2C application that interfaces with a CICS transaction using an External Call Interface
(ECI).
- Create a Java method, getCustomerInfo, which accepts a customer number. Depending
on the classification of the customer – preferred customer, regular
customer, or bad customer – the program returns different output
information about the customer.
- Create a Java class, TestECIMPO.java
to test your application.
Learning objectivesIn this tutorial,
you will:
- Use the J2C Java bean wizard
to create a J2C application that interfaces with a CICS transaction using an External Call Interface
(ECI).
- Create a Java method, getCustomerInfo, which accepts a customer number. Depending
on the classification of the customer – preferred customer, regular
customer, or bad customer – the program returns different output
information about the customer
- Create a test Java class
to test the application.
Time required
This tutorial takes approximately
30 minutes to finish. If you explore other concepts related to this
tutorial, it could take longer to complete.
Skill level
Experienced
Audience
This tutorial is intended for
users who are familiar with Enterprise Information systems (EIS) and CICS ECI in particular.
System requirements
To complete
this tutorial, you need to have the following tools and components
installed:
- IBM® WebSphere® Application Server, version V7.0,
V8.0, or V8.5.
- J2EE Connector (J2C) tools installed
- Connection to a CICS ECI server: In this tutorial, your application interacts with
a CICS program on a server.
Specifically, you need to set up a CICS transaction gateway on a machine to access the server.
You also need to perform some setup work on the CICS server machine, where you want the CICS to run. These steps are not
covered.
- A copy of the COBOL file taderc25.cbl. You can locate this
file in your product installation directory: <installdir>\IBM\SDP70Shared\plugins\com.ibm.j2c.cheatsheet.content_7.0.0\Samples\CICS\taderc25. If you want to store it locally, you can copy the code from here: taderc25.cbl
- A clean workspace.
Prerequisites
In order to complete this
tutorial end to end, you should be familiar with:
- J2EE and Java programming
- COBOL programming language
- CICS ECI server technology