You are on page 1of 51

IBM ^

Introduction to CICS Transaction Server

for OS/390 – Introduction and Unit 1

© 2004 IBM Corporation

IBM ^

Preface

Trademarks - All brand names and product names used in this course are trademarks, registered trademarks or trade names of their respective holders. Course Technology is not associated with any product or vendor mentioned in this course.

Audience – This is an introductory course for system administrators, database administrators, managers and programmers who are unfamiliar with CICS.

Prerequisites – The student should have a basic understanding of software and hardware, mainframe operations procedures, databases and business applications.

© 2004 IBM Corporation

IBM ^

Course overview

This course, OS/390 Introduction to CICS Transaction Server, introduces you to IBM’s Customer Information Control System (CICS), which is an online transaction processing (OLTP) product that is used for transaction processing in a mainframe environment.

You will learn about the internal structure of CICS, its various applications, and some of the utilities and products that enhance its use in an OS/390 environment.

This course also introduces the basic architecture of the most commonly used OS/390 CICS setups, such as the CICSPlex structure, and facilities for managing and maintaining these systems.

© 2004 IBM Corporation

IBM ^

Course overview

The first unit, What is CICS? introduces the principles of OLTP, including the distinction between batch and online processes, the steps involved in transaction processing, and the concepts of multitasking and concurrent processing.

The second unit, Managing Data and Resources, describes the different CICS regions and the resources for which they are responsible. Resource definition and the advantages offered by different methods of defining CICS resources are described. The unit also discusses the CICS utilities and structures that help ensure data integrity and recoverability.

© 2004 IBM Corporation

IBM ^

Course overview

The third unit, CICS and Databases, describes how CICS Transaction Server (TS) for OS/390 interacts with databases. In particular, it discusses the attachment facility that makes DB2 databases accessible from the CICS environment. An example of a CICS transaction involving interaction with an IBM Information Management System (IMS) database is also described.

The fourth unit, CICS Intercommunication, introduces the facilities in CICS TS for OS/390 that allow communication across regions and systems, and the products that enable users to access CICS from a Web browser.

© 2004 IBM Corporation

IBM ^

Course objectives

Upon completing this course, this is what you should be able to do:

State the general purpose, structure, and potential uses of the CICS application for OS/390

Define the basic terms used in CICS

List the CICS management modules involved in transaction processing

Identify the primary functions of the CICS application and describe the role these functions play in mainframe system management

(continued)

© 2004 IBM Corporation

IBM ^

Course objectives

Give examples of business computing situations where different CICS architectures would be used

Explain how CICS supports and interacts with DB2 and IMS, the two largest database products that are used

Trace the path of a transaction from a remote terminal through CICS to an IMS database

Identify the different methods in CICS for helping ensure data integrity and security

Describe the facilities for intercommunication with CICS TS for OS/390

Name and describe the possible methods for configuring CICS for Web browser access

© 2004 IBM Corporation

I1

IBM ^

Unit 1: What is CICS?

Topics:

1A: Introducing CICS 1B: Online transaction processing 1C: The structure of CICS

© 2004 IBM Corporation

Slide 8

I1

IBM_User; 7.10.2004

IBM ^

Unit 1 overview

In this unit you will learn how the Customer Information Control System (CICS) functions as an online transaction processing (OLTP) program for the OS/390 system.

You will learn the different steps in the processing of a transaction in CICS, and become familiar with the major CICS components involved in each step. The concepts of multitasking and control passing will also be introduced. Also, you will become aware of some common CICS-based architecture.

© 2004 IBM Corporation

IBM ^

Unit 1 objectives

Upon completing this unit, this is what you should be able to do:

Distinguish between online and batch processing methods List the major functions of an OLTP program Define these terms: transaction, task, multitasking List CICS management modules involved in transaction processing Describe the respective functions of the management modules involved in transaction processing Describe the steps involved in processing a transaction in CICS Distinguish between LINK and XCTL operations Describe the differences between single-region, IBM CICSPlex and Parallel Sysplex architectures

© 2004 IBM Corporation

IBM ^

1A. CICS functions

Transaction processing systems perform interactive electronic commerce from a network of terminals, processing both inquiries and updates to data stored in databases.

CICS is a general-purpose data communication system that can support the development of transaction processing applications in an OS/390 environment.

Operating systems are designed to make the best use of a computer’s resources. CICS helps by behaving as a middle layer, separating online application programs from other programs and handling their administration itself.

© 2004 IBM Corporation

IBM ^

1A. CICS functions

CICS is an OLTP product family from IBM. An OLTP is a class of software that administers transaction-related programs.

OLTP software functions include:

Managing the user interface Retrieving and modifying data Tracking data locations and uses Handling communications Providing support functions for resource definition and use Interfacing with security software

© 2004 IBM Corporation

IBM ^

1A. CICS functions

IBM introduced CICS (often pronounced “kicks”) in the early days of mainframe computer use. Its original purpose was as a transaction monitor, a window into a system’s operations allowing console operators and programmers to see what system activities were occurring.

Today, CICS can be classified as a middleware application, functioning beneath the operating system and above other applications. CICS Transaction Server for S/390 (CICS TS) is the version of CICS that functions as an assistant to the OS/390 operating system, as well as an administrative director to other applications.

CICS TS aids the system by handling complex tasks or transactions efficiently, freeing the system to process its normal non-transactional workload.
© 2004 IBM Corporation

IBM ^

1A. CICS functions

Unlike batch programs, CICS programs do not make direct calls to the operating system. Instead, CICS programs issue commands to perform terminal I/O, file I/O, program control, and other functions requiring a system resource.

In this way, CICS TS behaves as a mini-operating system within the actual operating system to provide an environment for CICS program execution.

All CICS programs run in the CICS region of storage, under CICS control. CICS programs use CICS for all interfaces. CICS, in turn, interfaces with the OS/390 operating system.

© 2004 IBM Corporation

IBM ^

1A. CICS functions

CICS TS serves as an interface between application programs, database managers and teleprocessing access methods.

For that reason, both the operating system and the user need only interact with a single application (CICS) for transaction processing.

© 2004 IBM Corporation

IBM ^

1A. CICS functions

CICS’s ability to manage transaction processing and to interface with many different applications makes it an indispensable tool for businesses that require many transactions to be processed quickly and accurately.

Systems that benefit from CICS include:

Bank ATM transaction processing services Online library catalogues Airline reservation systems

© 2004 IBM Corporation

IBM ^

1A. Batch vs. online processing

There are two different ways to process input requests: batch processing and online processing.

In batch processing, similar requests are saved up and submitted to the computer as a group. After they are submitted, the requests are processed sequentially. After all of the requests have been processed, the results are transmitted.

Batch processing is like a warehouse manager saving up all the orders for the day, sorting them into types of order, and then filling the orders, for example, packaging the merchandise for shipping.

© 2004 IBM Corporation

IBM ^

1A. Batch vs. online processing

In online processing, requests are submitted and processed individually as soon as the computer receives them. Results are transmitted to a user or file as soon as the results are available.

Unlike batch input, online input comes from multiple sources, and there is no way to sequence, predict or control the order and type of input. In the warehouse example, online processing is like the warehouse manager taking each order as it comes in and filling it immediately.

This is how CICS works as an OLTP – it receives requests to perform a service and it performs each of them immediately.

© 2004 IBM Corporation

IBM ^

1B. Online transaction processing—transactions

In CICS, a transaction is a sequence of related operations or steps that together perform a specific function.

Transactions might involve a single action or a set of operations, such as the set of steps in database updating, or the entire process of registering a new student in a college course.

The steps for a student registration transaction would include: 1) Reading the user’s registration request 2) Checking the current enrollment in the course 3) Determining whether there is space for an additional student 4) Adding the student to the class list 5) Sending confirmation of the transaction to the user

© 2004 IBM Corporation

IBM ^

1B. Online transaction processing—transactions

Each transaction in CICS has a four-character transaction identification (TRANSID) which describes the function that the transaction performs.

© 2004 IBM Corporation

IBM ^

1B. Online transaction processing—tasks

In CICS, an instance of a particular transaction request by a computer operator or user is called a task. When a user invokes a transaction, CICS begins a task for that request. CICS also loads any application programs required for the transaction.

For example, when a student registration request comes into the CICS system, CICS represents and keeps track of that request and its associated work by starting a unique task for it. CICS then loads the application programs that are required for executing that task.

© 2004 IBM Corporation

IBM ^

1B. Online transaction processing—tasks

CICS provides concurrent transaction processing, which means that many users can enter and process requests at the same time. In order to allow for many users while ensuring swift response times, CICS employs multitasking methods.

Under CICS, all users share application programs and data files. This means that if one transaction is being processed and another user make a similar request, CICS does not reload the application program. Instead, CICS starts a new task for the second request, using the same program or data file. CICS runs each task individually, briefly giving each task control of the CPU.

© 2004 IBM Corporation

IBM ^

1B. Online transaction processing—tasks

Because concurrent users all share the same data files, if one user updates a database, the changes are available to all users immediately.

This has obvious advantages in business applications such as airline reservation booking systems, where all system users need to be kept informed of factors like the current state of seat availability.

© 2004 IBM Corporation

IBM ^

1B. Online transaction processing—tasks

These steps are involved in processing a transaction:

1) Entry – A transaction ID (TRANSID) enters the CICS system.

2) Task creation – CICS creates a task to process the transaction. The task is now ready to be run.

3) Dispatch – CICS determines which of the ready tasks should be run next, and dispatches that task to be started.

4) Execution – The task invokes the appropriate CICS program and runs.

(continued)

© 2004 IBM Corporation

IBM ^

1B. Online transaction processing—tasks

5) Processing – When the invoked program calls CICS to perform a service on its behalf, the task gives up control of the CPU and waits for the requested service to be completed.

6) Redispatch – After the requested service has been completed, the task is ready to run again, and CICS dispatches it again.

7) Return – When all work required to process the TRANSID is done, the program issues a RETURN command to return control to CICS.

8) Termination – CICS removes the task from the system.

© 2004 IBM Corporation

IBM ^

1C. CICS components and domains

The CICS region is the area of storage that CICS manages. User programs share the CICS region with other CICS components. These are other types of objects in CICS:

Management modules – User programs interface with CICS management modules to handle terminal I/O, file I/O, program loading and control, and access to other system resources.

Tables – The management modules use the CICS system tables to obtain information about the terminals, files and application programs that are part of the CICS system. The tables are loaded into storage when the CICS system is started, and remain active until the system is shut down. (continued)

© 2004 IBM Corporation

IBM ^

1C. CICS components and domains

Control blocks – The management modules create control blocks to keep track of the status of all transactions that are currently being processed. The control blocks are released when they are no longer needed (that is, when the task leaves the system).

System data sets – The management modules and application programs use the CICS system data sets for transaction logging, system recovery, and storing processing results that are needed by other transactions or application programs.

© 2004 IBM Corporation

IBM ^

1C. CICS components and domains

The CICS region is divided into a set of domains, each containing a set of objects grouped together to perform a common set of functions.

domains contain management modules, tables and control blocks. A small set of domains handles a large part of the transaction processing cycle.

Three domains supervise and control transaction processing. They are: Transaction Manager (XM) Program Manager (PG) Storage Manager (SM)

© 2004 IBM Corporation

IBM ^

1C. CICS components and domains

Transaction Manager (XM) – The domain responsible for receiving transaction requests, and creating and organizing tasks to process transaction requests.

Program Manager (PG) – The domain responsible for locating and invoking application programs required for processing transactions.

Storage Manager (SM) – The domain responsible for allocating memory resources required for transaction processing.

© 2004 IBM Corporation

IBM ^

1C. CICS components and domains

CICS keeps full control of virtual storage in OS/390 environments. The Storage Manager (SM) handles dynamic storage, which is the available space in a CICS region that is left over after CICS has been loaded.

Dynamic storage is used for programs, I/O areas and workspaces.

In response to requests from other CICS domain managers, the Storage Manager frees, acquires, controls and keeps track of this open space.

The CICS Transaction Manager (XM) organizes all tasks currently in the system.

© 2004 IBM Corporation

IBM ^

1C. CICS components and domains

When a TRANSID enters the system, XM starts a task for that transaction request to be processed. XM does this by first searching the Program Control Table (PCT) to validate the TRANSID.

XM then calls the Storage Manager (SM) to create a control block called the Task Control Area (TCA) to keep track of task processing. A separate TCA is associated with each task.

© 2004 IBM Corporation

IBM ^

1C. CICS components and domains

During processing, a task alternates among these different states:

Ready to run Running Waiting

© 2004 IBM Corporation

IBM ^

1C. CICS components and domains

After a TCA has been created for the task, it is ready to run. Several tasks might be ready to run at one time – the XM orders them according to their CICS-assigned priority status. The priority of a task can change at various stages of processing, because the XM assesses and assigns priority status based on the function and relative importance of the pending tasks.

When the XM selects a task that is ready to run, it sends the task to another CICS component called the dispatcher. CICS stores a pointer to the TCA of the currently dispatched task in the common system area (CSA).

© 2004 IBM Corporation

IBM ^

1C. CICS components and domains

The CSA is a control block that exists for as long as the CICS system is active.

In addition to a pointer to the currently dispatched task, the CSA also contains: Other control blocks The CICS system tables The CICS management modules

© 2004 IBM Corporation

IBM ^

1C. CICS components and domains

While a task is executing, it has control over the CPU. When the task requires CICS to perform a service on its behalf (for example, to read in some data), the task gives up control of the CPU and waits for the requested service to complete. At that stage the task is waiting.

While the first task is waiting, the next task that is ready to run can be started. This is how CICS performs multitasking.

When a task is dispatched for execution, control is passed to the Program Manager (PG). The PG locates and invokes the first application program needed to process the transaction.

© 2004 IBM Corporation

IBM ^

1C. CICS components and domains

To locate the required application program, the PG searches the Processing Program Table (PPT) for the name of the module to receive control.

© 2004 IBM Corporation

IBM ^

1C. CICS components and domains

As already mentioned, CICS loads only a single copy of an application program, regardless of the number of users requiring it.

If the target application is already loaded into virtual storage, the PG passes control to it and allows it to run as required.

If the program is not already loaded, the PG locates it in the program library and loads it into virtual storage before passing control to it.

When the currently executing program module terminates, the PG again receives control and determines what to do next.

© 2004 IBM Corporation

IBM ^

1C. CICS components and domains

The processing of a single task may involve several different programs, either serially (one program after another) or in an embedded fashion because a single program may have calls to other programs embedded in it. The PG manages the passing of control between programs.

An application program may use a LINK operation to call another program to perform a service. When the main program issues a LINK command, control is passed to the linked-to program. When the linkedto program issues a RETURN command, control returns to the main program. Execution in the main program resumes with the statement immediately following the LINK command.

© 2004 IBM Corporation

IBM ^

1C. CICS components and domains

An XCTL operation causes control to be passed permanently from one subprogram to another.

The calling program does not regain control when the linked-to programs terminates. Instead, control goes to the program at the next higher level in the calling hierarchy, if the programs are multiply embedded.

If there is no higher calling program to which control can be returned, the Program Manager gives control to the Transaction Manager (XM) to terminate the task.

© 2004 IBM Corporation

IBM ^

1C. Single-region and CICSPlex setups

As you have learned, CICS manages an area of storage called a region. In some systems, CICS can manage more than one region. These different regions are identical except for the system or data function they perform. Each region can be devoted to particular types of transactions or applications while communicating easily with other regions in the system.

© 2004 IBM Corporation

IBM ^

1C. Single-region and CICSPlex setups

A system of connected CICS regions might contain:

Test regions for testing a new application

Function-specific regions for handling terminals or user interface and system services

Use-specific regions for managing certain applications, such as databases

© 2004 IBM Corporation

IBM ^

1C. Single-region and CICSPlex setups

When CICS is structured into multiple regions, the resulting architecture is called a CICSPlex. The different regions within a CICSPlex might reside in:

The same MVS image Different MVS images Different operating systems (for example, MVS, VSE, OS/390) Different hardware platforms (for example, S/390, PC, AS/400)

Communication features in CICS, along with networking products such as VTAM, NetView and others, allow separate mainframe systems to function as one entity, and allow users of those systems to have remote access.

© 2004 IBM Corporation

IBM ^

1C. Single-region and CICSPlex setups

CICS can be used in any business that requires the power of a mainframe to operate efficiently. Different CICS architectures suit different business needs.

© 2004 IBM Corporation

IBM ^

1C. Single-region and CICSPlex setups

Cluster technology links several individual OS/390 systems through CICS intercommunication to create a single computing resource.

Sysplex clustering helps prevent downtime, because other OS/390 systems are available and can take over if one system fails.

Another advantage of this type of distributed system is the nearly unlimited growth that a sysplex model can accommodate. As business needs change, the system can be expanded or reconfigured, and systems can be added to the sysplex in order to handle new data streams.

© 2004 IBM Corporation

IBM ^

1C. CICS extras

CICS is a powerful tool. However, when there are several CICS systems operating together and interacting with other applications, it becomes necessary to add managing tools for the CICSPlex systems.

One of the tools is the CICSPlex Systems Manager (CICSPlex SM), which allows management of a collection of CICSPlex systems by consolidating them and treating them as a single system image. CICSPlex SM is used with CICS Transaction Server (CICS TS) and other products from the CICS family.

© 2004 IBM Corporation

IBM ^

1C. CICS extras

Other useful managing tools are from the NetView family of products.

The NetView family of products consists of a useful set of tools for CICSPlex system network management. CICSPlex SM has a monitoring interface with NetView, which allows NetView’s Resource Object Data Manager (RODM) to track the use of CICS resources.

© 2004 IBM Corporation

IBM ^

1C. CICS extras

Another feature of CICSPlex SM is Business Application Services (BAS), which allows resource definition (including CICS transaction commands) across the entire CICSPlex. Using the CICS System Definition (CSD) feature, resource definitions are confined to a single CICS region or system. This system-replicated resource definition provides consistency, control and error prevention. (CSD is discussed in detail in Unit 2, Managing Data and Resources.)

© 2004 IBM Corporation

IBM ^

Unit 1 summary

Batch processing involves the processing of a group of similar items, and online processing involves the processing of a single item at a time.

The major functions of an OLTP program include: User-interface management Data retrieval and modification Communications handling Security software interface Data-use tracking and reporting

A transaction is a sequence of related operations that together perform a particular function. A task is the CICS-internal representation of a particular transaction request. (continued)

© 2004 IBM Corporation

IBM ^

Unit 1 summary

Multitasking allows many users to process transactions concurrently, and to access recent updates to data sets.

CICS is an OLTP software program that: Manages requests arriving from concurrent users Controls access to and updates all applications and data files Makes it appear that the user is interacting with only one application

Objects within the CICS region include management modules, controls, tables and system data sets. (continued)

© 2004 IBM Corporation

IBM ^

Unit 1 summary

CICS includes three management modules (SM, XM, PG), two control blocks (TCA and CSA) and one table (PCT).

During transaction processing, control is passed back and forth between relevant application programs. In both the LINK and XCTL operations, a program makes a call to another program. In the LINK operation, control is returned to the calling program when the linked-to program is finished. In the XCTL operation, control is returned to the calling program, but to the next higher program in the hierarchy.

A CICS structure can consist of a single region on a single system, or of multiple regions distributed over several systems. When CICS is structured into multiple regions, the resulting architecture is called a CICSPlex.
© 2004 IBM Corporation