CICS Transaction Gateway for Java and HTML

rangaleclickSoftware and s/w Development

Nov 4, 2013 (4 years and 1 month ago)

547 views

CICS Transaction Gateway for Java and HTML



1. Overview


With over 15000 businesses around the world running more than 20 billion transactions a day on
CICS, it is only natural that companies want to leverage the proven strengths of CICS within their e
-
business produc
ts.


Java is central to this strategy. CICS has the core strengths required to stand up to the real demands
of e
-
business; Java has the application development strengths to stand up to the pace of e
-
business.
Companies increasingly want to write e
-
busines
s applications using modern Java tools and run them
using the proven strengths of CICS, while also taking advantage of their existing investment in CICS
applications.


On the server, an evolutionary route starts with CICS applications written in Java runn
ing in CICS

TS 1.3, and progresses to CICS supporting Enterprise JavaBeans in the near future. Outside the
server, the CICS Transaction Gateway provides the means to access existing and new CICS
applications from Java and HTML. To complete the picture, Vi
sualAge for Java provides the
environment and tools needed to efficiently develop applications for CICS.


1.1
CICS meets Java


Assume a company has existing CICS applications written in COBOL, which are to be leveraged in a
modern Web environment. The end
-
us
er GUI may be implemented via a Java Applet or a Java Servlet
and HTML. In all cases, there is a requirement to efficiently access CICS applications, which provide
the core business logic, from the Java code, which provides the user interface. In this part
icular
instance, the CICS applications are callable using the CICS External Call Interface (ECI).


The IBM Solution, CICS Transaction Gateway


The first part of the solution is the CICS Transaction Gateway (CICS TG). The CICS TG provides the
conduit that

allows to run CICS applications from Java. Encompassing the technology of the CICS
Universal Client, the CICS TG performs the task of accepting a CICS request from a (possibly remote)
Java
-
client program and passing it up to the CICS server. The CICS TG
runs on a variety of platforms
including NT, AIX* and OS/390, and accepts CICS requests over a variety of network protocols
including HTTP and industry
-
standard SSL. Also a local mode of operation is supported, for when the
Java application is running on t
he same tier as the CICS TG.


1.2
e
-
business connectors


The need to access existing logic and data from Java isn't unique to CICS. Companies often have
valuable applications that exist in other enterprise servers such as IMS or which can be accessed via
MQS
eries*. Rather than accessing these resources using disparate APIs, a common technology has
been adopted by several IBM products. Called the Common Connector Framework (CCF), it provides
a consistent means of connecting to, and interacting with, enterprise

resources from any Java
execution environment.


A set of IBM e
-
business Connectors have been written to fit into the CCF model. A CICS Connector is
included as part of the CICS Transaction Gateway. Connectors also exist for IMS*, MQSeries and
Encina/DCE*
.


The CCF provides consistency in two ways :


• It provides a consistent client
-
application view of enterprise resources, whatever Connector is being
used. This consistent view also makes it easier for AD tools such as VisualAge for Java to generate
clie
nt code to use the CCF.


• It provides a consistent run
-
time view to a Connector, so that the Connector can be hosted in any run
-
time environment that supports CCF. As a result, any client code that uses the Connectors should be
applicable anywhere that s
upports CCF.


The CCF is currently key in providing access to enterprise resources from within VisualAge for Java,
IBM's WebSphere* and IBM's planned Enterprise Server for Java implementations.


1.3
Building application using VisualAge for Java


A Web applic
ation can use the CICS Connector to access CICS applications via the CICS Transaction
Gateway.


One approach is VisualAge for Java Version 2.0 (VAJ), Enterprise Edition. This includes the Enterprise
Access Builder (EAB), which comprises of the framework an
d tools needed to easily build code that
uses the Connectors.


The use of EAB requires three steps. To start with, you need to build an EAB Command bean which
encapsulates a single interaction with CICS. To do this you must use the JavaBeans that make up
the
CICS Connector. You take a CICSConnectionSpec and set its properties to describe the CICS server it
should access, along with details of the CICS Transaction Gateway used to get to it. Then take an
ECIInteractionSpec and set its properties to describe
the CICS application that you want to invoke. The
other thing required to build the Command bean are Records that describe the input and output data
for the interaction. Since in this instance the CICS applications are written in COBOL you can import
your
source, using an EAB tool that parses COBOL, to create the Record definitions for the CICS
COMMAREA used as input/output to your CICS applications. You 'wire' all these bits together visually
in VAJ to create your Command bean.


It is then possible to crea
te several Commands that can be linked together to create one logical
interaction. This can be done by creating an EAB Navigator bean which encapsulates the sequence of
Commands required.


The next part of the process is to create an EAB business object t
o provide the public interface to your
CICS resources. This contains a number of Java properties that represent the information from the
interactions with CICS that you want to expose. EAB mappers should be used to define the
relationships between your Com
mands/Navigators and these business object properties.


Finally, VAJ's GUI building tools allow you to assemble the desired user interface and to link it to the
interfaces of your business object.


VisualAge for Java, Enterprise Edition provides all the

components for writing CICS applications. In
addition to the VAJ IDE and the EAB, it also includes a CICS Transaction Gateway and the CICS
Connector.


2.
Introduction to CICS Transaction Gateway


The CICS Transaction Gateway Version 3 incorporates, in a sin
gle integrated product, the CICS
Universal Clients Version 3, which provide its functions for communication with CICS servers. All CICS
Universal Client functions are available at a machine running the CICS Transaction Gateway, and
there is no requirement
for the separate installation of the CICS Universal Clients. The CICS
Transaction Gateway also replaces and integrates the following previous gateway functions:




The CICS Internet Gateway, which is delivered for the OS/2 and Windows NT platforms as part of

the CICS Clients Version 2.




The CICS Gateway for Java, which is available for download from the Internet, for use with the
respective CICS Clients Version 2 or CICS for UNIX Clients.










2
.1 Main Features


The CICS Transaction Gateway provides the
following components:




CICS Gateway for Java



CICS Universal Client V3.0



CICS Java class library



TerminalServlet servlet



Set of EPI Java beans


The CICS Gateway for Java is a Java gateway application that is usually resident (for security reasons)
on a
Web server workstation. It communicates with CICS applications running in CICS servers through
ECI or EPI provided by the CICS Universal Clients. The communication between the Java gateway
application and the CICS Universal Clients is accomplished through
the NATIVE mapping interface.


The CICS Universal Client provides the ECI and EPI as well as the terminal emulation function (see
Chapter 7, “Introduction to CICS Universal Clients” on page 47 for more information).


The CICS Java class library includes cl
asses that provide an API and is used to communicate between
the Java gateway application and a Java application (applet or servlet). The JavaGateway class is
used to establish communication with the gateway process and uses Java's sockets protocol. The
EC
IRequest class is used to specify the ECI calls that are flowed to the


gateway. The EPIRequest class is used to specify the EPI calls that are flowed to the gateway. These
Java classes were previously available in the IBM CICS Gateway for Java.


The Termi
nalServlet allows you to use a Web browser as an emulator for a 3270 CICS application
running on any CICS server. The TerminalServlet can be used with a Web server or a servlet engine
that provides support equivalent to Java Servlet Development Kit (JSDK)
Version 1.1 or later. This is
an enhanced version of the function that was provided by the CICS Internet gateway in IBM CICS
Clients Version 2.


The set of EPI Java beans allows you to create Java frontends for existing CICS 3270 applications,
without any
programming.


2
.2 How the
CICS Transaction Gateway Works


A Web client accesses CICS programs and data through the CICS Transaction Gateway. Figure 153
on page 189 shows the CICS Transaction Gateway 3.0 installed on a server machine running a Web
server.
This configuration is necessary if you want to use Java applets with your CICS Transaction
Gateway.


Here is how the CICS Transaction Gateway works:


1. A Web browser or a network computer downloads a Web page that contains a java applet tag
pointing to a
Java CICS application.


2. Depending on your implementation scenario and your security needs, the browser starts to
communicate through either HTTP, HTTPS, SSL, or TCP and downloads the
ctgclient.jar
file that
contains all Java classes required to communic
ate with the CICS Universal Client. Table 1 on page 26
shows which protocol to use.


3. The Web browser can utilize (plug
-
in) additional Java servlets for business
-
specific tasks. In
addition, an applet can be written as a CORBA client running in an Java
-
e
nabled Web browser and
connect through IIOP to CORBA server objects. These CORBA server objects can be Java programs
or written in any other CORBA
-
supported language such as C++ or SmallTalk.


4. The NATIVE interface between the CICS Gateway for Java and t
he CICS Universal Client maps the
Java Gateway classes to CICS Universal Clients EPI and ECI calls and vice versa.


5. The CICS Universal Client flows the EPI or ECI request to the CICS server. The results are passed
back through the gateway to the browser
.







Figure 1 Th
e CICS Transaction Gateway









3.
TCP62


TCP62 enables the CICS Uni
versal Client to use TCP/IP access to a CICS

Transaction Server. This access is achieved using a product called AnyNet.

On the client workstation, the AnyNet component is provided by IBM Personal

Communications for Windows NT and Windows 98 and the IBM eNe
twork

Communications Server for OS/2. On Windows NT and Windows 98 you can

alternatively use a cut
-
down version of IBM Personal Communications that is

shipped with the CICS Universal Client for Windows NT V3.0.1 and CICS

Universal Client for Windows 98 V3.
0.1.






This is how it works:


1. The CICS Universal Client, using your CICSCLI.INI definitions, passes

data to the AnyNet component on the workstation.


2. The AnyNet component on the client workstation uses the domain name

suffix with the partner LU
name to generate an Internet Protocol (IP)

name. The IP address for this name is then determined either from the

local IP hosts file or from a domain name server (DNS). Using standard

TCP/IP flows, the data is shipped from the TCP/IP component on the

works
tation to TCP/IP on OS/390.


3. TCP/IP on OS/390 routes the data received from the workstation to the

AnyNet component on OS/390.


4. The SNA over TCP/IP feature of AnyNet translates the inbound IP routing

information to SNA routing information. The data i
s passed to VTAM and,

in turn, to the CICS Transaction Server for OS/390.