Date post: | 27-Dec-2015 |
Category: |
Documents |
Upload: | ajnwebmail |
View: | 29 times |
Download: | 3 times |
© 2004 IBM Corporation
IBM ^
Introduction to CICS Transaction Server
for OS/390 – Unit 3
© 2004 IBM Corporation
IBM ^
3A2. Hierarchical databases
Database resource adapter (DRA) is a component of the
CICS/DBCTL interface in the CICS address space. It performs request,
contact and other functions between CICS and DBCTL.
Database-level sharing is an IMS data-sharing type which allows an
application to read data in one region while another application reads or
updates the same data in another region. In this data-sharing type,
CICS can be designated an IMS region.
© 2004 IBM Corporation
IBM ^
3B. Functions of CICS attachment facility
CICS TS for OS/390 comes with an
attachment facility that allows you to
operate DB2 with CICS.
Through this facility, CICS
applications can access DB2 data
while operating within the CICS TS
for OS/390 environment. Thus,
the CICS applications can access
both DB2 and CICS data.
CICS coordinates the recovery of
both DB2 and CICS data if
transaction or system failure occurs.
© 2004 IBM Corporation
IBM ^
3B. Functions of CICS attachment facility
The CICS DB2 attachment facility
provides the following major functions:
An application program interface
that allows you to operate DB2 with
CICS
Attachment commands that display
and control the status of the
attachment facility
© 2004 IBM Corporation
IBM ^
3B. Functions of CICS attachment facility
Through the DB2 attachment facility API, the connection between CICS and DB2 can be created or terminated at any time. This connection and disconnection can be set up to occur automatically. You can also start and stop CICS and DB2 independently. The DB2 system can be shared by several CICS systems, but an individual CICS system can be connected to only a single DB2 system at a time.
© 2004 IBM Corporation
IBM ^
3B. Using the CICS attachment facility
The attachment commands that come with the CICS DB2 attachment
facility are issued using the CICS-supplied DSNC transaction ID.
The attachment commands include:
STRT – Start the connection to DB2
STOP – Stop the connection to DB2
DISP – Display the status of the connection to DB2
MODI – Modify the characteristics of the connection to DB2
DISC – Disconnect threads
© 2004 IBM Corporation
IBM ^
3B. Using the CICS attachment facility
CICS application programs make
requests to DB2 in the form of
Structured Query Language (SQL)
statements.
1) When a CICS application issues
an SQL request, the CICS
resource manager processes the
request and passes control to the
CICS attachment facility.
© 2004 IBM Corporation
IBM ^
3B. Using the CICS attachment facility
2) A transaction thread is scheduled
by the attachment facility.
3) DB2 checks the authorization for
the request and creates control
blocks for it.
4) When the SQL request has been
completed, DB2 passes data back
to the CICS attachment facility, and
the CICS application program
regains control.
© 2004 IBM Corporation
IBM ^
3B. Using the CICS attachment facility
You can use RDO to declare a
particular DB2 database available
to your CICS TS system.
Defining database resources
online means that you do not have
to shut down the CICS-DB2
attachment facility in order to make
changes to CICS-DB2 resources.
This allows continuous availability
for both systems.
© 2004 IBM Corporation
IBM ^
3B. Using the CICS attachment facility
Using RDO to define DB2
resources as CICS-managed
resources also has the advantage
of providing a consistent end-user
interface.
This means that users can use
familiar CICS transaction
identifiers to perform tasks such
as installing and manipulating
database entries.
© 2004 IBM Corporation
IBM ^
3C. Architecture example overview
In order to get a good understanding of the respective roles played by
CICS and a database system, it helps to look at an example of a
transaction processing setup.
In our example, 1st Bank is a midsize financial institution that has two
clusters of OS/390 systems, each with two MVS system images. Within
the MVS images there are multiple CICS and IMS regions. The OS/390
clusters are located in different cites that are miles apart.
© 2004 IBM Corporation
IBM ^
3C. Architecture example overview
© 2004 IBM Corporation
IBM ^
3C. Architecture example overview
CICS receives transactions and communicates with other regions
through Virtual Telecommunications Access Method (VTAM). VTAM is
an IBM API that is used for communicating with telecommunication
devices.
The systems in our example are connected to remote locations and to
each other through a network. Each system also has VTAM connections
in place for each MVS image accessed from the network via network
control program (NCP).
© 2004 IBM Corporation
IBM ^
3C. Architecture example overview
NCPs are key for routing
communication as they manage
the communication traffic between
terminals and CICS.
NCPs also route information between
the VTAM-serviced OS/390 images
and connected CICS regions using
ISC (intersystem communication).
© 2004 IBM Corporation
IBM ^
3C. Transaction initiation
A customer goes to an ATM and
inserts a bankcard. The ATM
requests the PIN number and
other information needed for the
transaction. The customer enters
the information at the PIN pad (1).
The information is routed to the
remote NCP (2), which in turn
takes it through the network to the
mainframe switch and then to the
system NCPs (3), which are tied
to miniprocessors.
© 2004 IBM Corporation
IBM ^
3C. Transaction initiation
The system NCP interfaces with VTAM, which is tied to all applications
on the mainframe. VTAM recognizes the transaction header and routes
it through the security translator application. Every remote terminal,
such as an ATM, is defined as a resource in a CICS TOR. VTAM
establishes a session with the TOR where the initiating remote terminal
is defined. CICS then takes over the transaction routing.
Throughout processing, CICS will invoke VTAM again if any cross-
region communication is needed.
Each CICS system has a TOR with a CSD file where all resources are
defined, including remote terminals such as ATMs.
© 2004 IBM Corporation
IBM ^
3C. Transaction initiation
After VTAM establishes a session
with the CICS TOR, CICS gives the
transaction a name and sends it
back through VTAM to the
appropriate AOR, which might or
might not be in the same CICS
system.
After CICS determines the source of
the transaction and names it, the
application required for processing
the transaction is located by the
AOR.
© 2004 IBM Corporation
IBM ^
3C. Transaction initiation
The AOR also initiates updates by
scheduling a program
specification block (PSB).
The PSB is sent by CICS to IMS,
where it is accepted by DBCTL.
The DBCTL controls the different
functions involved in the database
update.
© 2004 IBM Corporation
IBM ^
3C. Transaction initiation
Like CICS, IMS/DBCTL can be
split into regions, which improves
speed and efficiency in updating
and accessing data.
A multiregion setup consists of
these four regions:
Control region, which performs
the DBCTL functions contained
in the other regions.
© 2004 IBM Corporation
IBM ^
3C. Transaction initiation
DL/I region, which actually carries out the update. It contains the DL/I
code, control blocks and buffers for IMS databases, and performs the
accessing and updating of data through DL/I calls.
DBRC region, which is where logging and recovery information is kept
in case there are problems with the update.
IRLM region, which functions as a gatekeeper during the actual
database update executed by DBCTL, preventing any accessing of
the database segments being used by the update.
© 2004 IBM Corporation
IBM ^
3C. Transaction completion
Once DBCTL receives the transaction request, it executes the
transaction, retrieves the database segment information and sends the
information back to CICS.
If there are any problems at the database level, they will be logged by
the DBCTL region containing DBRC, which can then be accessed by
CICS in problem determination.
The IRLM prevents any corruption by other transactions requesting the
same database segment as the update. The DL/I region runs and
receives back the completed program to pass on to the DBCTL control
region.
© 2004 IBM Corporation
IBM ^
3C. Transaction completion
Now the transaction path reverses itself.
The completed update is sent back to the CICS AOR, where it is
acknowledged and renamed.
The transaction is then sent on to the original receiving AOR, retracing
its path.
The receiving AOR records the transaction name, logs its completion
level and sends the information on to CICS TOR.
© 2004 IBM Corporation
IBM ^
3C. Transaction completion
A VTAM session is once again initiated, this time from the CICS side.
VTAM takes over the transaction routing, through the security
translation application and out to the system NCP and miniprocessors.
The transaction is then sent out over the network to the remote NCP
and from there to the ATM, where the customer is waiting.
The ATM then issues the requested service, such as a cash withdrawal
or bank balance, to the waiting customer.
© 2004 IBM Corporation
IBM ^
3C. Transaction summary
The role of CICS in this complex transaction can be summarized as follows: CICS resource definition allows
VTAM to establish a successful session with CICS TOR.
The interregion interface between CICS TOR and AORs allows CICS to recognize, name and pass the transaction to the appropriate region where IMS programs are located.
© 2004 IBM Corporation
IBM ^
3C. Transaction summary
The CICS/IMS interface, involving CICS resource definition, resident
utilities and commands, allows efficient handling of the transaction
both going and coming from IMS/DBCTL.
The CICS information logged during the inward-bound path of the
transaction facilitates the outward handling to VTAM and from there to
the originating remote terminal (ATM).
© 2004 IBM Corporation
IBM ^
Unit 3 summary
This is what you learned in this unit: CICS supports both relational and hierarchical database structures. Relational databases, such as DB2, structure data in terms of tables
containing predefined data categories.
Hierarchical databases, such as IMS, structure data in a hierarchy where data lower in the hierarchy is dependent upon data higher in the hierarchy.
CICS receives transactions and communicates with other regions through
VTAM.
IMS/DBCTL, an important interface between CICS and IMS databases, is often structured into several different regions, including a control region, a DL/I region, a DBRC region and an IRLM region.