Sie sind auf Seite 1von 45

Customer Information Control System (CICS)

Day 1 Session 1

Updated in Nov 2004 Ver 2.0


Asias Largest Global Software & Services Company

Course Objectives
After completing this course you should be able to

Appreciate the salient features of CICS as a Transaction Processing system and as a DB/DC System Create user interfaces using CICS Basic Mapping Support (BMS). Access and modify VSAM files, database tables. Handle normal and abnormal CICS exception conditions. Use advanced features of CICS: Data Tables, Intercommunication, etc.
Ver 2.0
Asias Largest Global Software & Services Company

Sessions Outline

CICS Overview CICS - Application Programming Considerations CICS - Screen Handling - Basic Mapping Support CICS - Error and Exception Handling CICS - File and Database Handling CICS - Program Control CICS - Queuing Facility CICS - Interval &Task Control CICS - Testing and Debugging
Ver 2.0
Asias Largest Global Software & Services Company

Sessions Outline Advanced Topics


CICS - Storage Control CICS - CICS Intercommunication CICS - Restart and Recovery CICS - Administration and Set-up

DB2-CICS - Case Study

Ver 2.0
Asias Largest Global Software & Services Company

CICS - Overview
Session 1

Ver 2.0
Asias Largest Global Software & Services Company

Session 1 : Objectives
To Understand the
Business requirements for an online transaction processing

environment
Features and Strengths of CICS CICS Interface and Languages available to access CICS CICS Concepts and Terminologies Transaction Flow

Ver 2.0
Asias Largest Global Software & Services Company

Batch and Online System


Batch System
Transaction file

Online System
Online System

Terminals

Batch System
REPORTS VSAM / DATABASE

MASTER FILE

Ver 2.0
Asias Largest Global Software & Services Company

An Online System
ONLINE processing allows a user to interact with a

computer and access its resources via a terminal


Example : Railway Reservation system

Sales Processing system Costing system Stock Clearing System

Ver 2.0
Asias Largest Global Software & Services Company

What is CICS ?
Stands for Customer Information Control System A world-class transaction processing system - by IBM in

1960s Availability
Four versions in OS/390, CICS Transaction server 2.1 in z/OS AS/400, RISC/6000 & OS/2 PC Servers

Provides an interface between application programs and operating system services, such as data access and communication access
Ver 2.0
Asias Largest Global Software & Services Company

CICS Interface

Ver 2.0
Asias Largest Global Software & Services Company

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

Ver 2.0
Asias Largest Global Software & Services Company

Transactions and Tasks


CICS locates a application program using a four character

code called Transaction-identifier Application programs are associated with a transaction which when invoked 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

Ver 2.0
Asias Largest Global Software & Services Company

Transactions and Tasks


TASK 1
TXNA working storage for task 1

TASK 2
TXNA working storage for task 2

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

Ver 2.0
Asias Largest Global Software & Services Company

Features and Strengths of CICS


Multitasking within a single address space provided by the Operating System Multithreading allowing one copy of program loaded and shared by all users

Reentrancy of programs providing separate copy of working storage for each Task
Quasi-re-entrant Priority handling
Ver 2.0
Asias Largest Global Software & Services Company

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 the user interface is 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

Ver 2.0
Asias Largest Global Software & Services Company

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

Ver 2.0
Asias Largest Global Software & Services Company

CICS System
Operating System ( MVS/ESA)
Database Access Method (DL/I, DB2)
Data Access (VSAM/ BDAM )

Other systems
Telecommunication Access method (VTAM,TCAM,BTAM)

Data Storage

CICS/MV S
Data handling functions System services Data Monitoring functions communication Application program functions services

Terminal

CICS APP PROGRAMS (Cobol, PL/I, Assembler)


Ver 2.0
Asias Largest Global Software & Services Company

CICS - Terms and Definitions


Logical Unit of Work (LUW)

Synchronization Point (Syncpoint)


Basic Mapping Support Transaction Types

Ver 2.0
Asias Largest Global Software & Services Company

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 (SP)

Ver 2.0
Asias Largest Global Software & Services Company

Synchronization Point (Synchpoint)


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

Ver 2.0
Asias Largest Global Software & Services Company

BMS
Interface between the application program and the terminal

control (3270 devices)


Consists of supplied BMS modules and user-defined

screen maps
Provides format independence which simplifies

positioning of data on terminal


Uses maps as requested by the application program to

control the formatting of terminal I/O data


Maps created using the online tool SDF/CICS

Ver 2.0
Asias Largest Global Software & Services Company

CICS Application Pgm Communication

Ver 2.0
Asias Largest Global Software & Services Company

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.
Ver 2.0
Asias Largest Global Software & Services Company

Transaction Types (Contd.)


Non-Conversational Program
Programs (transactions) that are executed without user intervention Examples : Automatic Task Initiator, Batch Jobs

Ver 2.0
Asias Largest Global Software & Services Company

CICS Sample Screen Customer Inquiry

Ver 2.0
Asias Largest Global Software & Services Company

Structure Chart of a Customer Inquiry Program

Ver 2.0
Asias Largest Global Software & Services Company

Conversation Type - Illustration

EXEC CICS SEND SEND MAP(map_name) MAPSET(mapset_name) FROM(data_area) END_EXEC. IF CONVERSATION-TYPE = CONVERSATIONAL THEN EXEC CICS RECEIVE MAP(map_name) MAPSET(mapset_name) INTO(data_area) END_EXEC END-IF EXEC CICS RETURN TRANSID(txn_name) END_EXEC.

Ver 2.0
Asias Largest Global Software & Services Company

CICS Transaction Flow

Ver 2.0
Asias Largest Global Software & Services Company

CICS- Control Programs and Tables (IBM Supplied)


Temporary File Storage Control (TSP) (FCP) Journal Program Control Control (JCP) (PCP) Terminal Control (TCP)

CIC S

Transient Data (TDP)


Ver 2.0

Task Control Storage (KCP) Control (SCP)

Asias Largest Global Software & Services Company

CICS Control Programs & Tables (User Specified)


Terminal Control Program Task Control Program Program Control Program File Control Program Resource Control Program Journal control Program Temporary Storage Program Transient Data Program Storage Control Program TCT PCT PPT FCT RCT JCT TST DCT SCT

Ver 2.0
Asias Largest Global Software & Services Company

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
Ver 2.0
Asias Largest Global Software & Services Company

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

Ver 2.0
Asias Largest Global Software & Services Company

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

Ver 2.0
Asias Largest Global Software & Services Company

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

Ver 2.0
Asias Largest Global Software & Services Company

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)

Ver 2.0
Asias Largest Global Software & Services Company

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

Ver 2.0
Asias Largest Global Software & Services Company

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
Ver 2.0
Asias Largest Global Software & Services Company

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.


Ver 2.0
Asias Largest Global Software & Services Company

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

Ver 2.0
Asias Largest Global Software & Services Company

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

Ver 2.0
Asias Largest Global Software & Services Company

Ending the transaction


Output of a CICS process
Program extracts necessary fields from the VSAM record 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
Ver 2.0
Asias Largest Global Software & Services Company

Starting a TASK
TXN1
PCT Trans. TXC1 TXC2 TXN1 TXN2

CICS Address Space

Program MAPPGC1 MAPPGC2 TXNPGM1 TXNPGM2

MAPPGC1

PPT Program. MAPPGC1 MAPPGC2 TXNPGM1 TXNPGM2

Location In Storage On Disk In Storage On Disk

TXNPGM1

Load Module MAPPGC1 MAPPGC2 TXNPGM1 TXNPGM2

Library MAPLIB MAPLIB PGMLIB PGMLIB

Ver 2.0
Asias Largest Global Software & Services Company

CICS System Responsibilities

Systems Programmer

IT Management

Application Programmer
Ver 2.0

Operators (Administrators)

Asias Largest Global Software & Services Company

Session 1: Summary
Overview of Online transaction processing environment CICS Terms and Definitions Transaction, task, LUW, conversational and pseudo-conversational style CICS control programs and control tables CICS System Responsibilities

Ver 2.0
Asias Largest Global Software & Services Company

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
Ver 2.0
Asias Largest Global Software & Services Company

Das könnte Ihnen auch gefallen