Download as pdf or txt
Download as pdf or txt
You are on page 1of 53

Introduction to

Customer Information Control System (CICS)

1
Introduction to
Customer Information Control System (CICS)

2
Course Objectives

After completing this course you should be able to understand:

 The salient features of CICS as a Transaction Processing system and


as a DB/DC System
 Difference between Task and Transaction
 Multitasking, Multithreading and Reentrancy
 CICS Conversation Modes
 CICS Control Programs and Tables

3
CICS(Customer Information Control System)

What is it?
IBM's leading On-line Transaction Processing Software

Backbone of much of the world's enterprise computing

Emerging as the foundation of today's enterprise-wide mission critical On

Demand applications

How do I pronounce CICS?


It‟s really up to you! Here are a few of the pronunciations used around the
world,
KICKS in the UK
SEE EYE SEE ESS in the US
CICS Overview
 It is a data (base) communications system that provides
the user access to online business systems
and data with security.

CICS can be classed as middleware, or acting as an “application


server” to user applications.

Providing the customer services to help them implement online


business applications.
CICS Overview Contn'd
What does it do?
Instantaneous online transactions
e.g. ATMs, online share dealing, electronic ticketing
Some facts about CICS successes
30 billion+ transactions a day
$1 trillion in transactions each day
30 million users worldwide
900,000 concurrent users supported

Who uses it?


Around 90% of zSeries customers worldwide
90% + of the Fortune 500
Companies in ALL industry categories
CICS History
CICS was first released as a Product in 1969.

Early 3270, virtual storage systems, database and


recovery/restart support in the 1970s

Support on multiple platforms z/OS (OS/390), VSE, AIX,


AS/400, OS/2, NT

Latest Release:CICS Transaction Server for z/OS,Version 5


Release 2
Batch and Online System

8
An Online System
 Online processing allows a user to interact with
a computer and access its resources via a terminal

Transaction processing that occurs interactively


with the user on front end is referred to as


OLTP(Online transaction processing).

Mainframes online transaction systems has a


ability to run/support an unpredictable number of
simultaneously/concurrent users and transaction
in short time periods.

 These systems are support's critical application;


therefore, high performance continuous
availability, data protection and integrity are
required.

Example : Railway Reservation system


Sales Processing system
Costing system
Stock Clearing System
9
Batch Processing System
The bank applications that
produce bank account
statements come under batch
applications, that is, they are
processed without user
interaction.

A batch job is submitted


(through JCL) on the
mainframes, which reads and
processes data in terabytes,
and produces output, such as
customer account statements.

10
Basic Differences-Batch Vs Online

BATCH ONLINE

Input data prepared before the execution Data is prepared at the time of execution
as needed

Program and files can't be shared Program and files can be shared

Programs are scheduled through JOBS Programs are initiated through transactions
anytime

Recovery and restart is easy Recovery and restart requires additional


process

11
CICS Interface

12
CICS Concepts
• CICS runs as a batch job and can handle hundreds of interactive
users that are using a variety of applications
• More than one CICS system (or region) can run on the same
computer at the same time.
• Programs running in one region do not interfere with programs
running in another region

13
CICS – As a Batch Job
Transactions in CICS
 Each user's interaction with a business information system involves one or
more transactions.

 Each transaction is a set of operations that must be executed as a unit


(although each operation can run in a different process).

15
Transactions and Tasks

• CICS locates an application program using a four character code


called Transaction-identifier

• When application programs are invoked, CICS starts a Task

• A task is the execution of an application program for a specific user

• Several users may invoke the same transaction, with each given a
separate task

16
Transactions and Tasks
TASK 1 started at terminal1 by user1
executes TXNA.
TASK 1 TASK 2

TXNA TXNA
TASK 2 started at terminal2 by user2
executes the same TXNA.
working working
storage for storage for
These two tasks use the same load
task 1 task 2 module associated with TXNA.
However, the working storage for
each task is different.

17
Features and Strengths of CICS
• Multitasking
• Multithreading
• Reentrancy
• Quasi-re-entrancy
• Priority handling

18
Multitasking

• Multitasking within a single address space provided by the Operating


System

-Ability to control many tasks running concurrently in an address space.

-CICS provides for concurrent execution of multiple tasks, including tasks


of the same type, like Order Entry. CICS has its own task management
capabilities for execution of tasks within a single region partition and does
not use the multitasking feature of the O/S.

19
Multithreading
Multithreading allowing one copy of program loaded and shared by all users
 Ability to use only one copy of the program when more than one task of
the same type is active thereby minimizing main storage.

Each task will acquire a working storage section; however all the tasks
will use the same load module. This feature is called multi-threading.

 Since several tasks can be running at the same time , CICS is a multi-
tasking system.

 Once the program finishes executing, the working storage for that user is
released and the virtual memory that was used is free to be allocated to
another user.

20
Re-entrancy & Quasi-reentrancy

 The ability of the program to enter itself without any modifications is re-
entrancy.

 This feature is called as Quasi-reentrant in CICS. The word „Quasi‟ is added to


differentiate it from OS.

 Quasi-Reentrancy is a concept that a program does not modify itself during its
execution under CICS, so that it can re-enter into itself after an interruption by
CICS at a CICS command.

21
CICS – User Interfaces
• Majority of CICS applications written for 3270 display terminals or PCs
that are emulating 3270 terminals
 Presentation and Business logic provided by CICS
 User interface implemented using Basic Mapping Support (BMS)

• CICS can also be used with other types of user interfaces


 CICS at the back-end provides business logic
 Front end provides presentation logic
• A VB program
• A front-end program written in another platform
• Web applications run in a Web browser through HTTP

22
CICS Programming Languages
• COBOL
 Most used in mainframe
• Assembler language
 Fairly popular till 1970s
• PL/I
 Alternative to COBOL in 1970s & 1980s
• C and C++
 Object oriented classes can be developed that access CICS services
• Java
 Newest language for writing CICS applications
 Object oriented classes can be developed that access CICS services

23
CICS - Terms and Definitions
• Logical Unit of Work (LUW)
• Synchronization Point (Syncpoint)
• Transaction Types

24
Logical Unit of Work (LUW)
From the application designer's point of view, a LUW is a
sequence of actions that needs to be completed before any of
the individual actions can be regarded as complete as shown
below

- - - - - - - - - - - - - - - LUW - - - - - - - - - - - - - - -
Task A |----------------|---------------------|---------------------------¦
SOT Update Delete EOT
File - 1 2 records

25
Logical Unit of Work (LUW)
In CICS, a group of related operations is called a logical unit of work (LUW).
CICS LUWs ensure the integrity and consistency of business information
systems by providing the ACID properties (atomicity, consistency, isolation,
and durability)

26
Synchronization Point (Syncpoint)
 CICS automatically issues a SYNCPOINT at the end of each task
 All the updates made by the task so far will be committed
 All the resources maintained by the dynamic log will be released
 A syncpoint arises in the following ways
 Implicitly at the end of a transaction, by an EXEC CICS RETURN
command at the highest logical level
 Explicitly by EXEC CICS SYNCPOINT commands issued (to commit
the changes made to the resources such as files, database tables etc.) by
the application programmer at appropriate points in the transaction.

27
CICS Application Pgm Communication

28
Transaction Types
• Conversational Program
 Program (transaction) remains idle when waiting for user response
 Program, data areas, control blocks remain in main storage resulting in high
virtual storage utilization

• Pseudo-conversational Program
 Program ends after it sends data to a terminal
 Program is in storage only when processing data, otherwise storage released for
other transactions/tasks.

29
Transaction Types (Contd.)

• Non-Conversational Program

-Does not involve any user interaction (e.g. all Batch programs)

-Transaction has to be initiated by special ways


•Automatic task initiation
•Using START command from another transaction

30
More on Conversational Transaction

 Program converses with the user using SEND and RECEIVE command pair

 In a conversational program, after processing the data, the same will be sent to the
terminal and the program will be in a “wait” state for the terminal user to complete
further data entry.

 Only when the terminal user completes the data entry and/or presses the Enter/PA
keys, will the transaction re-start.

 Till such time, the resources allocated to the task will have to be retained by CICS.
A few such tasks will result in CICS going short of main storage allocated to it, thus
affecting overall system performance.

 Applications written in conversational mode are very inefficient

31
Example-Conversational Transaction

32
More on pseudo conversational Transaction

 Once a task is initiated, CICS will keep processing it till an I/O or external input is
required.

 It then suspends that task and releases its resources. When the I/O is complete,
CICS will then resume the task.

 Pseudo conversational programs are more efficient than Conversational programs


but involve a bit of programming.

 CICS restarts the program when the user completes an entry and presses one of the
terminal's attention identifier (AID) keys.

33
CICS- Control Programs and Tables
(IBM Supplied)
Temporary File
Storage Control
Journal (TSP) (FCP)
Control Program
(JCP) Control
(PCP)

CICS
Terminal Task
Control Control
(TCP) (KCP)
Storage
Transient Control
Data (SCP)
(TDP)

34
CICS Control Programs & Tables
(User Specified)
• Terminal Control Program - TCT
• Task Control Program - PCT
• Program Control Program - PPT
• File Control Program - FCT
• Resource Control Program - RCT
• Journal control Program - JCT
• Temporary Storage Program - TST
• Transient Data Program - DCT
• Storage Control Program - SCT

35
Terminal Control Flow (TCT)

• The Terminal Control Table (TCT)


has an entry for each terminal

• Together with Basic Mapping


Support, terminal control provides
an application program, the ability
to communicate with a terminal

36
Task Control (PCT)
• Task control validates transactions
by checking the Program Control
Table (PCT)

• Task is created after the transaction


is validated

• Concurrent processing of more than


1 task is possible (multitasking)

• Error message is sent to the terminal


by task control for an invalid
transaction

37
Program Control (PPT)
• Task Control passes control to
Program Control, which keeps track
of the location of every application
program

• The Processing Program Table (PPT)


contains the program size, program
source language, and other program
information

• Stores the program library address the


first time to make subsequent loading
of program faster

38
User Application Programs

• The application program processes the input and issues commands to


request services that are needed in performing the function of the
application

39
File Control and Database
• The application program issues a
command to retrieve a record from a
VSAM file

• VSAM/(B)DAM are the only files


used in CICS and they should be
defined in the File Control Table
(FCT)

• For access to relational database as


DB2, define the attachment to DB2
in the Resource Control Table
(RCT)

40
Journal Control
• The Journal control facility
automatically logs the changes on
the system log, when an application
changes record in a file

• System log defined in the Journal


Control Table (JCT) enables CICS
to back-out changes when a task
fails

• Maximum of 99 journals

41
Trace Control
• Tracing is a CICS debugging aid

• CICS can write trace entries in a


Trace Table (TRT)

• Execute Diagnostic Facility (EDF)


is another feature that enables
interactive debugging

• Command Interpreter (CECI)


allows a programmer to enter and
test CICS commands at the terminal
directly

42
Dump Control
• In case of serious error conditions,
CICS will abend the task with a
task dump

• The CICS transaction ABEND


message contains the ABEND
code.

43
Temporary Storage Control
• Controls storage of data in main
storage or on disk for later
retrieval

• Records can be retrieved in the


same sequence in which they are
stored

• Records reside in Temporary


Storage Queue (TSQ) unless
deleted or when CICS closes

• Temporary Storage Table (TST) is


required for recovery purpose

44
Transient Data control
• CICS queuing function – sequential
queue

• The Destination Control Table


(DCT) contains the queue
definitions

• Transient data has 2 types of


queue:
– Intra-partition transient data
– Extra-partition transient data

45
Ending the transaction
• Output of a CICS process
 Program extracts necessary fields from the VSAM/Database and setup
an output area to be sent to the terminal

• Task ends when the application program issues the RETURN command

• All storage associated will be released

• Other tasks can use the storage just released

46
Starting a TASK
PCT
TXN1 Trans. Program
TXC1 MAPPGC1
TXC2 MAPPGC2
TXN1 TXNPGM1
CICS Address Space PPT
TXN2 TXNPGM2
Program. Location
MAPPGC1 In Storage
MAPPGC2 On Disk
TXNPGM1 In Storage
MAPPGC1 TXNPGM2 On Disk

Load Module Library


MAPPGC1 MAPLIB
MAPPGC2 MAPLIB
TXNPGM1 TXNPGM1 PGMLIB
TXNPGM2 PGMLIB

47
CICS System Responsibilities

Systems Programmer IT Management

Application Programmer Operators (Administrators)


48
CICS System Responsibilities Cont'd
IT Management ensures that systems utilizing the most appropriate
technology are in place to
satisfy all of the information needs of the company the customers and the
suppliers.

CICS system programmer has knowledge of how the CICS system works,
use of SMP/E to install releases and patches, how to find (and fix) problems
with application programs and knowing when to contact a vendor for support.
On top of that basic knowledge, a CICS system programmer must know how
to configure CICS, the various tables that are assembled or updated online, and
how to specifically maintain CICS (for example, what to do when a region
starts generating short-on-storage messages).


CICS System Responsibilities Cont'd
CICS Application Programmers are CICS Developers who use CICS to
access data with added knowledge about the CICS interface calls, pseudo
conversational programming, and so forth.

CICS Administrators(Operators) supports all of the active CICS regions on


the system or lpar which include problem resolution, performance issues,
configuration of the CICS regions, etc.
Session Summary
• Introduction to CICS
•Batch and Online Systems
•Multitasking, Multithreading and Reentrancy
• CICS Terms and Definitions
•Transaction, task, LUW, conversational and
•Pseudo-conversational style

• CICS control programs and control tables

• CICS System Responsibilities

51
References
• Yukihisa Kageyama, CICS Handbook, McGraw Hill Book Co.

• CICS/ESA Application Programming Guide, Ver.3, Release 2.1.

• CICS/ESA Intercommunication Guide

• Joseph Le Bert, CICS Made Easy, McGraw Hill International Editions,


1987

• Raul Menendez and Doug Lowe, CICS for the COBOL Programmer, Part
1&2, Mike Murach & Associates, 1992

52
THANK YOU

53

You might also like