introduction to cics transaction server3a 102704

17
© 2004 IBM Corporation IBM ^ Introduction to CICS Transaction Server for OS/390 Unit 3

Upload: ajnwebmail

Post on 21-Jul-2016

35 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Introduction to CICS Transaction Server3A 102704

© 2004 IBM Corporation

IBM ^

Introduction to CICS Transaction Server

for OS/390 – Unit 3

Page 2: Introduction to CICS Transaction Server3A 102704

© 2004 IBM Corporation

IBM ^

Unit 3: CICS and databases

Topics:

3A. Types of databases

Relational

Hierarchical

3B. The CICS-DB2 interface

3C. Working with databases

Page 3: Introduction to CICS Transaction Server3A 102704

© 2004 IBM Corporation

IBM ^

Unit 3 overview

Databases are included as key resources for almost any mainframe

business environment. All businesses use some type of database setup

to store customer information or other types of important data that

needs to be updated and retrieved easily.

Today, large relational databases such as DB2 are used widely.

However, hierarchical applications, used more frequently in the early

days of mainframes, are still popular.

(continued)

Page 4: Introduction to CICS Transaction Server3A 102704

© 2004 IBM Corporation

IBM ^

Unit 3 overview

This unit deals with databases

and CICS interactions with them.

Using a financial institution’s

CICSPlex as a model, you will

trace the path of a transaction

from a remote terminal through

CICS to an Information Management

System (IMS) database.

Page 5: Introduction to CICS Transaction Server3A 102704

© 2004 IBM Corporation

IBM ^

Unit 3 objectives

Upon completing this unit, this is what you should be able to do: Distinguish between a relational and a hierarchical database, and list

the advantages of each

Explain how CICS supports and interacts with the two largest database products used: DB2 and IMS

Describe the functions and advantages of the CICS attachment facility for DB2

Describe the typical CICSPlex setup, and how the various products interact to provide customer services in a modern banking model

Describe the path of a transaction from a remote terminal to a CICS-connected database

Describe the role that CICS plays in a typical bank transaction based on an IMS model

Page 6: Introduction to CICS Transaction Server3A 102704

© 2004 IBM Corporation

IBM ^

3A. CICS-supported databases

The two most common types of

databases are relational and

hierarchical.

CICS supports both types of

databases, primarily through

these IBM applications:

DB2, developed in the 1980s

IMS, used since the early 1970s

Page 7: Introduction to CICS Transaction Server3A 102704

© 2004 IBM Corporation

IBM ^

3A. CICS-supported databases

The database application that a

business selects depends directly on

business needs.

Although DB2 is widely popular in

mainframe use, some businesses

(financial institutions in particular)

have found it expensive and difficult to

adapt their existing data resources

entirely to DB2. Therefore, IMS is still

widely used in businesses that have

need for a large and accessible

database with well-defined structural

and maintenance requirements.

Page 8: Introduction to CICS Transaction Server3A 102704

© 2004 IBM Corporation

IBM ^

3A1. Relational databases

Relational databases are based

on a model developed by an IBM

researcher in 1970.

In a relational database, data is

structured into tables whose

columns specify a particular data

category.

Page 9: Introduction to CICS Transaction Server3A 102704

© 2004 IBM Corporation

IBM ^

3A1. Relational databases

DB2 accesses data by referring to its content rather than its location

or organization in storage. In this type of system, data can be accessed

or viewed in many different ways without having to reorganize the

database.

Relational databases are the most common today, because they:

Are flexible

Are consistent

Offer data and application independence

Page 10: Introduction to CICS Transaction Server3A 102704

© 2004 IBM Corporation

IBM ^

3A1. Relational databases

The DB2 family (DB2 for ESA, DB2 for VSE, DB2 for VM, DB2 for

OS/390) includes the most common relational database products found

in mainframe environments with CICS TS. CICS provides both

attachment interfaces for DB2 and monitoring and control services.

DB2’s data manager supplies interfaces and utilities that enable

programmers to write data access commands in Structured Query

Language (SQL) with the structure EXEC SQL. This style is very close

to CICS’ EXEC CICS commands. DB2 programs can therefore be

created and modified by programmers with CICS knowledge, and vice

versa.

Page 11: Introduction to CICS Transaction Server3A 102704

© 2004 IBM Corporation

IBM ^

3A1. Relational databases

In addition to the CICS EXEC /

EXEC SQL similarity, CICS

applications that can process DB2

tables can also access any SQL

data manager and file control.

That is, CICS applications can use

SQL, and any SQL database

manager can access CICS

applications. This means that DB2

data can be accessed from a

CICS TS for OS/390 environment.

Page 12: Introduction to CICS Transaction Server3A 102704

© 2004 IBM Corporation

IBM ^

3A2. Hierarchical databases

Hierarchical databases are based

on a parent-child relationship in

data storage, much as the way a

genealogical diagram traces

backward to an original ancestor.

Their greatest strength is their

speed, especially for large data

banks. However, programmers

who maintain them must be very

familiar with their structure, and

they are much less flexible than

relational databases.

Page 13: Introduction to CICS Transaction Server3A 102704

© 2004 IBM Corporation

IBM ^

3A2. Hierarchical databases

Until recently, most of the world’s commercial information was stored on

IMS structures. This means that the continued use of IMS is likely,

considering the high costs and complexity of converting large data

banks to a product like DB2.

Database managers like IMS are particularly effective on CICSPlex

systems where networks take transactions from many terminals or

sources to the appropriate AORs in CICS.

Page 14: Introduction to CICS Transaction Server3A 102704

© 2004 IBM Corporation

IBM ^

3A2. Hierarchical databases

The language used for data

manipulation in IMS is Data

Language I (DL/I).

DL/I enables the definition of data

structures and the relation of

structures to applications, and the

loading and reorganization of

these structures. DL/I can enable

application programs to retrieve,

replace, delete and add segments

to databases.

Page 15: Introduction to CICS Transaction Server3A 102704

© 2004 IBM Corporation

IBM ^

3A2. Hierarchical databases

There are other important interfaces

that are helpful when using IMS as a

primary database structure.

In many systems, CICS online

programs interface with the IMS

Database Control (DBCTL) facility.

Page 16: Introduction to CICS Transaction Server3A 102704

© 2004 IBM Corporation

IBM ^

3A2. Hierarchical databases

IMS Resource Locks Management (IRLM), another interface, helps ensure

efficient updates of a database without loss of data integrity. IRLM’s primary

purpose is to hold locks on segments of the database that IMS/DBCTL is trying

to update, thus ensuring that segments are not accessed until the update is

complete.

Database Recovery Control (DBRC) is an IMS facility containing information

for database recovery. DBRC’s functions are:

Generate recovery control statements

Verify recovery input

Maintain a separate change log for database data sets

Support the sharing of an IMS DL/I database by multiple subsystems (including

IMS or CICS regions)

(continued)

Page 17: Introduction to CICS Transaction Server3A 102704

© 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.