cics overview session

Upload: dreamka12

Post on 17-Oct-2015

33 views

Category:

Documents


2 download

DESCRIPTION

CICS Overview Session

TRANSCRIPT

  • Asias Largest Global Software & Services Company

    Ver 2.0

    Customer Information Control

    System (CICS)

    Day 1 Session 1

    Updated in Nov 2004

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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.

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    Sessions Outline Advanced Topics

    CICS - Storage Control

    CICS - CICS Intercommunication

    CICS - Restart and Recovery

    CICS - Administration and Set-up

    DB2-CICS - Case Study

  • Asias Largest Global Software & Services Company

    Ver 2.0

    CICS - Overview

    Session 1

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    Batch System Online System

    Batch System

    Online System

    Transaction file

    MASTER FILE

    REPORTS VSAM / DATABASE

    Terminals

    Batch and Online System

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    CICS Interface

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    Transactions and Tasks

    TASK 1 TASK 2

    TXNA TXNA

    working

    storage for

    task 1

    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.

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    System services

    Monitoring functions

    Application program

    services

    CICS System

    Operating System ( MVS/ESA) Database

    Access

    Method (DL/I,

    DB2)

    Data

    Access

    (VSAM/

    BDAM )

    Telecommunication

    Access method

    (VTAM,TCAM,BTAM)

    CICS/MVS

    Data

    handling

    functions

    Data

    Storage Data communication

    functions

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

    Terminal

    Other systems

  • Asias Largest Global Software & Services Company

    Ver 2.0

    CICS - Terms and Definitions

    Logical Unit of Work (LUW)

    Synchronization Point (Syncpoint)

    Basic Mapping Support

    Transaction Types

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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)

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    CICS Application Pgm Communication

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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.

  • Asias Largest Global Software & Services Company

    Ver 2.0

    Transaction Types (Contd.)

    Non-Conversational Program Programs (transactions) that are executed without user

    intervention

    Examples : Automatic Task Initiator, Batch Jobs

  • Asias Largest Global Software & Services Company

    Ver 2.0

    CICS Sample Screen Customer

    Inquiry

  • Asias Largest Global Software & Services Company

    Ver 2.0

    Structure Chart of a Customer

    Inquiry Program

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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.

  • Asias Largest Global Software & Services Company

    Ver 2.0

    CICS Transaction Flow

  • Asias Largest Global Software & Services Company

    Ver 2.0

    CICS- Control Programs and Tables

    (IBM Supplied)

    CIC

    S

    File

    Control

    (FCP)

    Program

    Control

    (PCP)

    Task

    Control

    (KCP)

    Journal

    Control

    (JCP)

    Terminal

    Control

    (TCP) Transient

    Data

    (TDP)

    Temporary

    Storage

    (TSP)

    Storage

    Control

    (SCP)

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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)

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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.

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    Starting a TASK

    TXN1 Trans. Program TXC1 MAPPGC1

    TXC2 MAPPGC2

    TXN1 TXNPGM1

    TXN2 TXNPGM2

    PCT

    Program. Location

    MAPPGC1 In Storage

    MAPPGC2 On Disk

    TXNPGM1 In Storage

    TXNPGM2 On Disk

    PPT

    Load Module Library

    MAPPGC1 MAPLIB

    MAPPGC2 MAPLIB

    TXNPGM1 PGMLIB

    TXNPGM2 PGMLIB

    CICS Address Space

    TXNPGM1

    MAPPGC1

  • Asias Largest Global Software & Services Company

    Ver 2.0

    CICS System Responsibilities

    Systems Programmer

    Operators (Administrators) Application Programmer

    IT Management

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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

  • Asias Largest Global Software & Services Company

    Ver 2.0

    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