Java programs can access the following CICS® services
through the JCICS programming interface: Data management, communications,
unit-of-work, program, and diagnostic services.
CICS services managers usually have the word control in their title;
for example, "terminal control" and "program control". These
terms are used extensively in CICS information.
Data management services
CICS provides the
following data management services:
- Record-level sharing, with integrity, in accessing Virtual Storage
Access Method (VSAM) data sets. CICS logs activity to support data
backout (for transaction or system failure) and forward recovery (for
media failure). CICS file control manages the VSAM data.
CICS also
implements two proprietary file structures, and provides commands
to manipulate them:
- Temporary storage
- Temporary storage (TS) is a means of making data readily available
to multiple transactions. Data is kept in queues, which are created
as required by programs. Queues can be accessed sequentially or by
item number.
Temporary storage queues can reside in main memory,
or can be written to a storage device.
A temporary storage
queue can be thought of as a named scratchpad.
- Transient data
- Transient data (TD) is also available to multiple transactions,
and is kept in queues. However, unlike TS queues, TD queues must be
predefined and can be read only sequentially. Each item is removed
from the queue when it is read.
Transient data queues are always
written to a data set. You can define a transient data queue so that
writing a specific number of items to it acts as a trigger to start
a specific transaction. For example, the triggered transaction might
process the queue.
- Access to data in other databases (including DB2®),
through interfaces with database products.
Communications services
CICS provides commands
that give access to a wide range of terminals (displays, printers,
and workstations) by using SNA and TCP/IP protocols. CICS terminal
control provides management of SNA and TCP/IP networks.
You can
write programs that use Advanced Program-to-Program Communication
(APPC) commands to start and communicate with other programs in remote
systems, using SNA protocols. CICS APPC implements the peer-to-peer
distributed application model.
CICS also provides an Object
Request Broker (ORB) to implement the inbound and outbound IIOP protocols
defined by the Common Object Request Broker Architecture (CORBA).
The ORB supports requests to execute Java stateless objects and enterprise
beans.
The following CICS proprietary communications services
are provided:
- Function shipping
- Program requests to access resources (files, queues, and programs)
that are defined as existing on remote CICS regions are automatically
routed by CICS to the owning region.
- Distributed program link (DPL)
- Program-link requests for a program defined as existing on a remote
CICS region are automatically routed to the owning region. CICS provides
commands to maintain the integrity of the distributed application.
- Asynchronous processing
- CICS provides commands to allow a program to start another transaction
in the same, or in a remote, CICS region and optionally pass data
to it. The new transaction is scheduled independently, in a new task.
This function is similar to the fork operation provided
by other software products.
- Transaction routing
- Requests to run transactions that are defined as existing on remote
CICS regions are automatically routed to the owning region. Responses
to the user are routed back to the region that received the request.
Unit of work services
When CICS creates a new
task to run a transaction, a new unit of work (UOW) is started automatically.
(Thus CICS does not provide a BEGIN command, because one is not required.)
CICS transactions are always executed in-transaction.
CICS provides
a SYNCPOINT command to commit or roll back recoverable work done.
When the sync point completes, CICS automatically starts another unit
of work. If you terminate your program without issuing a SYNCPOINT
command, CICS takes an implicit sync point and attempts to commit
the transaction.
The scope of the commit includes all CICS
resources that have been defined as recoverable, and any other resource
managers that have registered an interest through interfaces provided
by CICS.
If you write enterprise beans using transaction services
provided by commands defined by the Java Transaction Service (JTS),
these commands (including BEGIN) are mapped by CICS to its unit of
work services.
Program services
CICS provides commands that
enable a program to link or transfer control to another program, and
return.
Diagnostic services
CICS provides commands
that you can use to trace programs and produce dumps.