Sunteți pe pagina 1din 34

Introduction to CICS

Introduction to CICS
Objectives
Batch and Online systems
Brief history of CICS
CICS system concepts
CICS control programs and tables
Structure of CICS application program
CICS command format
Command language translator and compiler
Batch and Online Systems
Batch Systems
Data is batched together before processing
Data is sequential from cards , tape or disk
Master file can be used by one program
Output consists of printed reports or updated master files
On-line Systems
Data is entered individually, in any order
Transactions are initiated from terminal
Information is always current
Output is displayed on the terminal
Turnaround time is measured in seconds
Complementary Nature : Online Batch
Brief History of CICS
CICS stands for Customer Information Control System
Early CICS
Initial version, DB/DC was a macro level
Cumbersome : required special skills
CICS Command Level
Commands are high-level language version of macros
Application development is much easier
Current CICS Family
CICS/MVS
Version 2 release 1 - runs under MVS/XA
The CICS environment
OPERATING SYSTEM
Batch Job 1
CICS
Region
Batch Job 2 Batch Job 3
CICS
APP 1
APP 2
Stock
Processing
Accounts
Payable

Payroll
CICS Concepts
Objectives
Controls information in a modern on-line environment
Provides DB as well as DC functions called DB/DC system
Allows hundreds of concurrent users, many of whom share the
files
Acts as an interface between application programs and OS
services
CICS is an OS under an OS
As far as OS is concerned CICS is an application program. It
has its own JCL
APPLICATION
PROGRAMS
VTAM
OR
TCAM
CICS
VSAM
Terminal Users
Disk storage
How CICS
acts as an
interface
between
programs
and host
OSs access
methods
CICS Concepts (contd.)
VTAM: Virtual Telecommunications Access Method
TCAM: Telecom Class Address Management
One of the OSs
access methods
Multitasking
CICS allows more than one task to be executed at the same
time.
All OSs that support CICS do provide multitasking on their
own.
CICS provides multitasking from within the single address
space or portion provided by the OS overriding its
multitasking function.
Multitasking works the same way irrespective of the OS
under use.
CICS manages multitasking of CICS tasks within its own
region i.e. more than one CICS task run concurrently
CICS Concepts (contd.)
User 1
Order Entry
User 3
Menu Pgm
User 2
Customer Inq.
User 5
Order Entry
User 4
File Maint.
CICS address space
CICS Concepts (contd.)
Multithreading
Under CICS, only one copy of each program is loaded into
storage
Multiple users running the same program have access to the
same storage location
The area of storage containing a program is not allocated to
a specific user
Its a subset of multitasking
CICS manages its tasks within its own region
CICS Concepts (contd.)
Reentrant Program
Whose executable code can be run by many tasks at the same
time
The storage associated with the executing program doesnt
get modified
Many COBOL and FORTRAN compilers generate inherently
non-reentrant code
A reentrant program is a program that is capable of
supporting more than one process at the same time
As the program is running, information that is unique to the
process is stored in a place that belongs to the process

CICS Concepts (contd.)
Reentrant Program (Contd..)
This makes it possible for the same instructions to execute for
another process before the previous process is complete
This kind of program is necessary to support concurrent
processes and multiple processors
Constants and variables will never be modified or shared by
different tasks
DWS: Its possible by acquiring a Dynamic Working Storage
area for each task

CICS Concepts (contd.)
Quasi-Reentrancy
To make multithreading possible, an application program
must be reentrant (under OS) or quasi-reentrant (under
CICS)
Under CICS command level, when CICS executes a CICS
command level COBOL application CICS automatically
acquires a unique copy of WS
The application doesnt have to acquire DWS for each task
If a program alters itself, the information is kept in a Task
Global Table (TGT) which is a part of the program
CICS acquires TGT uniquely to each task, when another task
with same program is initiated, the task can use the original
program
No special coding is required to ensure quasi-reentrancy

CICS Concepts (contd.)
User 1
Working
Storage
Order
entry
Procedure
Division
User 2
Working
Storage
User 1
User 2
How CICS provides a separate copy of working storage for each user
CICS Concepts (contd.)
Transactions and Task initiation
Users cant directly invoke a program, instead invoke a
transaction
CICS locates the program associated with that transaction
Loads it into storage, if its not already there and starts a
task
Every transaction is defined into a table called PCT to invoke
the associated Program
CICS uses PPT to decide whether a program is in memory or
on disk
CICS Concepts (contd.)
User 1
Trans Program
DM01 DMPGM01
OUWA OU6050CP
ASLO AR1100CP
PCT
Program Location
DMPGM01 On disk
OU6050CP In storage
AR1100CP On disk
PPT
Library Load module
DMPROG DMPGM01
OU6050CP
ARLIB01 AR1100CP
User enters Trans-id ASLO
CICS
locates
trans-id in
PCT
CICS locates
pgm in PPT
CICS locates
load module
on disk loads
into memory
DMPGM01
OU6050CP
AR1100CP
CICS address space
CICS Concepts (contd.)
Disk
Data
Management
Services
CICS
Management
Services
Application
Programming
Interface
Data
Communication
Services
CICS Services
CICS Concepts (contd.)
Application
Programs
CICS Services
1) Application Programming Interface (API)
All the above services are accessed thru API.
API in turn insures that all CICS services are invoked in
a consistent manner.
API provides response codes.

CICS Concepts (contd.)
CICS Services
2) Data communication Services
Lets your programs to access terminals
Interface to Communication access Methods
Basic Mapping Support (BMS)
Device independence
Format independence
To manage complex strings of control characters and data.
Terminal Control
Send / Receive text / data from / to Terminals
Handles most of the working with communication links.
CICS Concepts (contd.)
Basic Mapping Support & Terminal Control
CICS Concepts (contd.)
Application
Program
Interface
Terminal
Control
Basic Mapping
Support
Maps
VTAM or
TCAM
Application
Programs
Terminal Users
CICS
CICS System components
3) Data Handling Services
Interface between CICS and the data
Interface with access methods such as VSAM.
Interface with database access methods, such as DB2 ,
SQL/DS and DL/I
To maintain data integrity by:
Control of simultaneous record updates
Protection of data at task abends
Protection of data at system failures
CICS Concepts (contd.)
File Control
CICS Concepts (contd.)
Application
Programming
Interface
File Control
VSAM
Application
Programs
CICS
Disk
storage
Shared access
- A major task
CICS System components
4) Application Program Services
Interface with COBOL / PL/I
Command level translator
Execution of diagnostic facility (EDF)
Command interpreter
Screen definition facility (SDF)
Trace and dump facility
CICS Concepts (contd.)
CICS System components
5) System Services
Interface between CICS and the operating system.
Program control such as load and release of application
programs.
Task control such as task scheduling based on the task
priority.
6) Monitoring Functions
Monitors and provides a series of statistics to be used
for system tuning.
CICS Concepts (contd.)
CICS Control Programs and Tables
The Core portion of CICS - The CICS nucleus
CICS Control Programs - IBM supplied
CICS Control Tables - User specified
Advantages
Some CCPs are meant for application programmers, while
the other are used by systems programmers.
CCPs use CCTs as reference data.
Any system configuration can be updated in CCTs by system
programmers.
CICS Control Programs
FCP (File Control Program)
JCP (Journal Control Program)
KCP (Task Control Program)
PCP (Program Control Program)
SCP (Storage Control Program)
TCP (Terminal Control Program)
TDP (Transient Data Program)
TSP (Temporary Storage Program)
CICS Control Tables
FCT (File Control Table)
JCT (Journal Control Table)
PCT (Program Control Table)
PPT (Processing Program Table)
TCT (Terminal Control Table)
DCT (Destination Control Table)
TST (Temporary Storage Table)
Structure of CICS Application Programs
Requirements for COBOL program
IDENTIFICATION DIVISION must satisfy:
Program-ID is required
The below are optional, but recommended
AUTHOR
DATE-WRITTEN
DATE-COMPILED
REMARKS
ENVIRONMENT DIVISION
only the header is required
Structure of CICS Application Programs (contd.)
DATA DIVISION
WORKING-STORAGE SECTION is required
LINKAGE SECTION is optional
PROCEDURE DIVISION
The following statements are prohibited, because these trigger
OS Supervisor Calls;
ACCEPT, CURRENT-DATE, DATE, DAY, DISPLAY, EXHIBIT, TRACE
OPEN, CLOSE, READ, WRITE, REWRITE, DELETE, START
REPORT WRITER feature
SORT feature
Equivalent statements (except REPORT WRITER and SORT) are
prepared in the form of CICS commands
CALL statement is allowed

Command format and argument values
General Format

EXEC CICS function
[option (argument value)]
[option (argument value)]
:
END-EXEC

Function : a CICS service request
Option : one of the options available to command
argument value: Determines the characteristics of the
value to be placed for the option as
detailed information
Command format and argument values
General Format
Six types of Argument values;
1. Data Value: The actual value, the variable or the constant.
Eg: record length or key length

2. Data Area: A variable or a constant.
Eg: I/O area or a key field

3. Pointer-Ref.: The name of Base Locator for Linkage (BLL) cell,
defined as a full word binary field (PIC s9(8) COMP).
Used to establish addressability.
Command format and argument values
General Format
3. Name : Name is a Literal Constant / data Area
Eg: FILEA
4. Label : COBOL paragraph or Section Name
Eg: 00525-LI-TRAILER-LOOP
5. HHMMSS : Decimal Constant used for Time expression
Eg: Data name of S9(7) COMP-3

Program Compilation
Conventional batch compilation: No Translation
CICS application compilation:

Load module and link-edit list
CICS program source
Command Translator
Translated source
code and listing
Compiler
Object module and
compile listing
Linkage Editor
Execution of CICS program
Basic Procedure of execution
Translate, Compile and link-edit a CICS application
program load module
Define the transaction Id into PCT with the associated
program name
Define the program into PPT
Sign on to CICS
Execute the Transaction

S-ar putea să vă placă și