SlideShare a Scribd company logo
13
Most read
19
Most read
20
Most read
0
CICS
i
AbouttheTutorial
CICS stands for Customer Information Control System. CICS was developed in
1968 by IBM. CICS allows users to develop and execute online application in an
MVS environment. CICS has become the most commonly used server for Internet
applications.
CICS is a transaction processing system which is also called as Online Transaction
Processing (OLTP) Software. CICS is a data communication system that can
support a network containing hundreds of terminals.
Audience
This tutorial is designed for software programmers who would like to understand
the concepts of CICS starting from scratch. This tutorial will give you enough
understanding on CICS from where you can take yourself to higher levels of
expertise.
Prerequisites
Before proceeding with this tutorial, you should have a basic understanding of
COBOL programming. A basic knowledge of MVS and TSO/ISPF subsystem will
help you grasp the concepts of CICS better.
Disclaimer&Copyright
 Copyright 2015 by Tutorials Point (I) Pvt. Ltd.
All the content and graphics published in this e-book are the property of Tutorials
Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy,
distribute, or republish any contents or a part of contents of this e-book in any
manner without written consent of the publisher. We strive to update the contents
of our website and tutorials as timely and as precisely as possible, however, the
contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides
no guarantee regarding the accuracy, timeliness, or completeness of our website
or its contents including this tutorial. If you discover any errors on our website or
in this tutorial, please notify us at contact@tutorialspoint.com
CICS
ii
TableofContents
About the Tutorial..................................................................................................................................i
Audience ................................................................................................................................................i
Prerequisites ..........................................................................................................................................i
Disclaimer & Copyright...........................................................................................................................i
Table of Contents ..................................................................................................................................ii
1. CICS – OVERVIEW...............................................................................................................1
Functions of CICS...................................................................................................................................1
Features of CICS.....................................................................................................................................2
2. CICS – ENVIRONMENT .......................................................................................................3
CICS Environment..................................................................................................................................3
Data Communication Services ...............................................................................................................4
Data Handling Services ..........................................................................................................................4
Application Programming Services ........................................................................................................4
Monitoring Services...............................................................................................................................5
3. CICS – BASIC TERMS...........................................................................................................6
IBM 3270 Terminal ................................................................................................................................6
CRT Monitor..........................................................................................................................................6
Keyboard...............................................................................................................................................7
Transaction............................................................................................................................................8
Task.......................................................................................................................................................8
LUW.......................................................................................................................................................9
Application ............................................................................................................................................9
4. CICS – NUCLEUS...............................................................................................................10
Control Programs ................................................................................................................................10
TCP......................................................................................................................................................10
KCP......................................................................................................................................................10
CICS
iii
PCP......................................................................................................................................................10
FCP ......................................................................................................................................................10
SCP ......................................................................................................................................................11
Control Tables .....................................................................................................................................11
TCT ......................................................................................................................................................11
PCT......................................................................................................................................................11
PPT......................................................................................................................................................11
FCT ......................................................................................................................................................12
Transaction..........................................................................................................................................12
Transaction Life Cycle..........................................................................................................................13
5. CICS – TRANSACTIONS .....................................................................................................16
CESN....................................................................................................................................................16
CEDA ...................................................................................................................................................16
CEMT...................................................................................................................................................16
CECI .....................................................................................................................................................17
CEDF....................................................................................................................................................18
CMAC ..................................................................................................................................................18
CESF.....................................................................................................................................................18
CEBR....................................................................................................................................................18
CICS Concepts......................................................................................................................................19
Multitasking........................................................................................................................................19
Multi-threading...................................................................................................................................19
Re-entrancy.........................................................................................................................................19
Quasi-reentrancy ................................................................................................................................19
6. CICS – COBOL BASICS.......................................................................................................20
CICS Program.......................................................................................................................................20
Program Compilation ..........................................................................................................................22
7. CICS – BMS.......................................................................................................................24
Formatted Screen................................................................................................................................24
BMS Basic Terms .................................................................................................................................25
Map.....................................................................................................................................................25
CICS
iv
Mapset................................................................................................................................................25
BMS Macros........................................................................................................................................25
8. CICS – MAP ......................................................................................................................31
Physical Map .......................................................................................................................................31
Symbolic Map......................................................................................................................................32
Skipper and Stopper Field....................................................................................................................32
Skipper Field .......................................................................................................................................32
Stopper Field.......................................................................................................................................33
Attribute Byte......................................................................................................................................33
Modified Data Tag...............................................................................................................................34
Send Map ............................................................................................................................................34
Receive Map........................................................................................................................................36
Mapset Execution................................................................................................................................36
9. CICS – INTERFACE BLOCK.................................................................................................38
Restricted COBOL Verbs ......................................................................................................................38
Execute Interface Block .......................................................................................................................38
EIB Fields .............................................................................................................................................39
CICS Programs Classification................................................................................................................39
Non Conversion Programs ..................................................................................................................39
Conversion Program............................................................................................................................40
10. CICS – PSEUDO PROGRAMMING......................................................................................43
Pseudo-Conversion Program ...............................................................................................................43
Pseudo Conversion Techniques ...........................................................................................................44
COMMAREA........................................................................................................................................44
DFHCOMMAREA .................................................................................................................................45
Pseudo Code........................................................................................................................................45
Advantages of Pseudo Conversion.......................................................................................................48
Return Statements ..............................................................................................................................48
Return-1..............................................................................................................................................48
CICS
v
Return-2..............................................................................................................................................48
11. CICS – AID KEYS................................................................................................................49
Validating AID keys..............................................................................................................................49
DFHAID................................................................................................................................................49
Cursor Positioning ...............................................................................................................................51
Dynamically Modifying Attributes .......................................................................................................51
12. CICS – FILE HANDLING......................................................................................................54
Random Access....................................................................................................................................54
Read ....................................................................................................................................................54
Read Command Options.....................................................................................................................56
Read Command Exceptions ................................................................................................................57
Write ...................................................................................................................................................57
Write Command Exceptions ...............................................................................................................58
Rewrite................................................................................................................................................59
Rewrite Command Exceptions............................................................................................................60
Delete..................................................................................................................................................60
Delete Command Exceptions..............................................................................................................62
Sequential Access................................................................................................................................62
STARTBR..............................................................................................................................................62
READNEXT / READPREV.......................................................................................................................63
RESETBR ..............................................................................................................................................63
ENDBR.................................................................................................................................................64
13. CICS – ERROR HANDLING.................................................................................................65
CICS Errors...........................................................................................................................................65
Error Handling Commands...................................................................................................................65
Handle Condition.................................................................................................................................65
Handle Abend......................................................................................................................................66
Abend..................................................................................................................................................67
CICS
vi
Ignore Condition..................................................................................................................................68
Nohandle.............................................................................................................................................68
14. CICS – CONTROL OPERATIONS.........................................................................................70
Program Logical Levels ........................................................................................................................70
XCTL ....................................................................................................................................................71
Link......................................................................................................................................................72
Load ....................................................................................................................................................72
Release................................................................................................................................................73
Return .................................................................................................................................................73
Interval Control Operations.................................................................................................................73
ASKTIME..............................................................................................................................................73
FORMATTIME......................................................................................................................................73
15. CICS – TEMPORARY STORAGE..........................................................................................75
COMMAREA ........................................................................................................................................75
Common Work Area............................................................................................................................75
Transaction Work Area........................................................................................................................75
Temporary Storage Queue ..................................................................................................................75
WRITEQ TS...........................................................................................................................................76
READQ TS ............................................................................................................................................76
DELETEQ TS .........................................................................................................................................77
Transient Data Queue..........................................................................................................................77
WRITEQ TD..........................................................................................................................................77
READQ TD............................................................................................................................................77
DELETEQ TD.........................................................................................................................................78
16. CICS – INTERCOMMUNICATION.......................................................................................79
Benefits of Intercommunication..........................................................................................................79
CICS
vii
Basic Terminologies.............................................................................................................................79
Intercommunication Methods.............................................................................................................80
17. CICS – STATUS CODES......................................................................................................81
18. CICS – INTERVIEW QUESTIONS.........................................................................................82
CICS
8
CICS is a DB/DC system which is used in online applications. CICS was developed
because batch operating system can execute only batch programs. CICS programs
can be written in COBOL, C, C++, Java, etc. These days, users want information
within seconds and in real time. To provide such quick service, we need a system
which can process information online. CICS allows users to communicate with the
back-end system to get the desired information. Examples of online programs include
online banking system, flight reservation, etc. Following image shows the
components of CICS and how they are inter-related:
FunctionsofCICS
The main functions performed by CICS in an application are as follows:
 CICS manages requests from concurrent users in an application.
 Although, multiple users are working on CICS system but it gives a feel to user
that he is the single user only.
 CICS gives the access to data files for reading or updating them in an
application.
1. CICS – OVERVIEW
CICS
9
FeaturesofCICS
The features of CICS are as follows:
 CICS is an operating system in itself, as it manages its own processor storage,
has its own task manager which handles execution of multiple programs, and
provides its own file management functions.
 CICS provides online environment in batch operating system. Jobs submitted
are executed immediately.
 CICS is a generalized transaction processing interface.
 It is possible to have two or more CICS regions at the same time, as CICS runs
as a batch job in the operating system at the back-end.
CICS
10
CICS itself acts as an operating system. Its job is to provide an environment for
online execution of application programs. CICS runs in one region or partition or
address space. CICS handles scheduling for programs running under it. CICS runs as
a batch job and we can view it in the spool by issuing the command PREFIX CICS*.
There are five major services which are provided by CICS. All these services together
perform a task.
CICSEnvironment
Following are the services which we will be discussing in detail step by step:
 System Services
 Data Communication Services
 Data Handling Services
 Application Programming Services
 Monitoring Services
 System Services
CICS maintains control functions to manage the allocation or de-allocation of
resources within the system which are as follows:
 Task Control – Task control provides task scheduling and multitasking
features. It takes care of the status of all CICS tasks. Task Control allocates
the processor time among concurrent CICS tasks. This is called multitasking.
CICS tries to prioritize the response time to the most important task.
 Program Control – Program Control manages loading and releasing of
application programs. As soon as a task begins, it becomes necessary to
associate the task with the appropriate application program. Although many
tasks may need to use the same application program, CICS loads only one
copy of the code into memory. Each task threads its way through this code
independently, so many users can all be running transactions that are
concurrently using the same physical copy of an application program.
2. CICS – ENVIRONMENT
CICS
11
 Storage Control – Storage Control manages acquiring and releasing of main
storage. Storage control acquires, controls, and frees dynamic storage.
Dynamic storage is used for input/output areas, programs, etc.
 Interval Control – Interval Control offers timer services.
DataCommunicationServices
Data Communication Services interface with telecommunication access methods such
as BTAM, VTAM, and TCAM for handling data communication requests from
application programs.
 CICS releases application programs from the burden of dealing with terminal
hardware issues through the use of Basic Mapping Support (BMS).
 CICS provides Multi Region Operation (MRO) through which more than one
CICS region in the same system can communicate.
 CICS provides Inter System Communication (ISC) through which a CICS region
in a system can communicate with the CICS region on another system.
DataHandlingServices
Data Handling Services interface with data access methods such as BDAM, VSAM,
etc.
 CICS facilitates servicing of data handling requests from application programs.
CICS provides application programmers a set of commands for dealing with
data set and database access and related operations.
 Data Handling Services interfaces with database access methods such as
IMS/DB, DB2, etc. and facilitate servicing of database requests from
application programs.
 CICS facilitates management of data integrity by control of simultaneous
record updates, protection of data as task ABENDs and protection of data at
system failures.
CICS
12
ApplicationProgrammingServices
Application Programming Services interface with application programs. The
application programming services of CICS provide features such as command level
translation, CEDF (the debug facility) and CECI (the command interpreter facility).
We will be discussing more in detail in upcoming modules.
MonitoringServices
Monitoring Services monitor various events within CICS address space. It provides
series of statistical information that can be used for system tuning.
CICS
13
We must have knowledge of the basic terms used in CICS to get a better
understanding of how it works. Application programs use CICS for communication
with remote and local terminals and subsystems.
IBM3270Terminal
The 3270 Information Display System is a family of display and printer terminals.
3270 terminals were being used to connect to the mainframe via IBM controllers.
Today, 3270 emulation software is available which means that even normal PCs can
be used as 3270 terminals. 3270 terminals are dumb terminals and do not do any
processing themselves. All processing needs to be done by the application program.
IBM terminals consist of the following components:
CRTMonitor
The CRT monitor displays the output or the input fields of the application program. A
screenshot of a 3278 Model of CRT monitor is shown below. It has the following
characteristics:
 It is capable of displaying 1920 characters.
 Each of these 1920 character positions is individually addressable.
 A COBOL application program can send data to all the positions on the screen.
 The display characteristics like intensity, protected, non-protected of the field
can be set using BMS which we will be discussing in detail in upcoming
modules.
3. CICS – BASIC TERMS
CICS
14
Keyboard
IBM keyboard keys are divided into following two categories:
 Non-AID Keys – All other keys for alphabets, numeric, punctuation etc. are
Non-Aid keys. When the user types text or numbers using non-aid keys, CICS
will not even know if the user is typing anything or not.
 AID Keys – AID keys are known as Attention Identifier Keys. CICS can detect
only AID keys. After typing all the input, only when the user presses one of
the AID keys, CICS takes control. AID Keys : ENTER, PF1 to PF24, PA1 to PA3,
CLEAR. AID keys are further divided into two categories:
o PF Keys – PF keys are known as function keys. PF keys allow transfer of
data from terminal to CICS. PF Keys are ENTER and PF1 to PF24.
o PA Keys – PA keys are known as Program Access keys. PA keys do not
allow transfer of data between terminal and CICS. PA Keys are PA1 to PA3
and CLEAR.
CICS
15
Transaction
A CICS program is invoked through a transaction. A CICS transaction is a collection
of logically related programs in an application. The whole application could be logically
divided into several transactions.
 Transaction identifiers which are 1 to 4 characters long are used to identify the
transactions which the users want to do.
 A programmer links one program to the transaction identifier which is used to
invoke all the application programs for that particular transaction.
Task
A Task is a unit of work which is specific to a user.
 Users invoke an application by using one of the transaction identifiers. CICS
looks up for the transaction identifier to find out which program to invoke first
to do the work requested. It creates a task to do the work, and transfers control
to the mentioned program.
 A transaction can be completed through several tasks.
 A task can receive data from and send data to the terminal that started it. It
can read and write files and can start other tasks also.
CICS
16
Task vs. Transaction
The difference between a transaction and a task is that several users can invoke a
transaction but each user initiates his own task.
LUW
LUW stands for Logical Unit of Work. LUW states that a piece of work should be done
completely or not done at all. A task can contain several Logical Unit of Works in
CICS. We will discuss more about it in upcoming modules.
Application
An application is a series of logically grouped programs to form several transactions
which is used to complete a specific task for the end-user.
CICS
17
The five CICS system components described earlier are a convenient grouping of
CICS system programs, each of which performs its own specialized functions. The
core of CICS known as the CICS Nucleus which consists of IBM-supplied CICS Control
Programs and Control Tables.
ControlPrograms
CICS nucleus is constructed by the control programs and corresponding control
tables. It provides unique advantages. It makes the CICS system highly flexible and
thus easy to maintain. Following are the important control programs of CICS:
TCP
TCP is known as Terminal Control Program.
 TCP is used to receive messages from the terminal.
 It maintains hardware communication requirements.
 It requests CICS to initiate the tasks.
KCP
KCP is known as Task Control Program.
 KCP is used to simultaneously control the execution of tasks and its related
properties.
 It handles all the issues related to multi-tasking.
PCP
PCP is known as Program Control Program.
 PCP is used to locate and load programs for execution.
 It transfers the control between programs and in the end, it returns the control
back to the CICS.
4. CICS – NUCLEUS
CICS
18
FCP
FCP is known as File Control Program.
 FCP is used to provide application programs with services like read, insert,
update or delete records in a file.
 It keeps exclusive control over the records in order to maintain data integrity
during record updates.
SCP
SCP is known as Storage Control Program. It is used to control allocation and de-
allocation of storage within a CICS region.
ControlTables
CICS consists of IBM-supplied CICS control programs and tables. These tables need
to be updated accordingly with the application information for successful execution
of CICS application programs. Following are the important Control Tables:
TCT
TCT is known as Terminal Control Table.
 When we login to a CICS terminal, an entry is made in the TCT table.
 TCT contains the terminal ID's that are connected to current CICS region.
 Terminal Control Program along with terminal control table recognize the
incoming data from the terminal.
PCT
PCT is known as Program Control Table.
 It contains the Transaction IDs (TRANSID) and the corresponding program
names or program IDs.
 TRANSID is unique in PCT table.
CICS
19
PPT
PPT is known as Processing Program Table. PPT contains Program name or Mapset
name, Task Use Counter, Language, Size, Main storage address, Load library address,
etc.
 Program or Mapset name is unique in a PPT table.
 CICS receives the transaction and a corresponding program name is allocated
to the transaction from the PCT. It checks if the program is loaded or not. If it
is loaded, then the task use counter is increased by 1. If the program is not
loaded, then the program is first loaded and the task use counter is set to 1.
It gets the load library address from the PPT table.
FCT
FCT is known as File Control Table.
 It contains File names, File type, record length, etc.
 All the files used in a CICS program must be declared in FCT and they are
opened and closed by CICS itself.
Transaction
When a transaction identifier TP02 is entered on the CICS terminal, first it checks if
there is a program associated with this Transaction identifier in the PCT table. If it
finds one, then it checks in the PPT table to find the location of the Program to execute
it.
If the program is already available in the memory, it starts executing that particular
program; if not, it loads the program to the memory from the secondary storage and
then starts executing it.
CICS
20
CICS
21
TransactionLifeCycle
The transaction life cycle has the following steps:
Step 1
The terminal operator initiates the transaction by typing a 1 to 4-character
transaction-id and pressing the ENTER key.
Step 2
The TCP periodically checks all the terminals for input. When a message is received,
it does the following:
 Instructs the SCP to create a TIOA.
 Places the message in the TIOA.
CICS
22
End of ebook preview
If you liked what you saw…
Buy it from our store @ https://store.tutorialspoint.com

More Related Content

PPT
CICS basics overview session-1
PPT
JCL MAINFRAMES
PDF
JCL FOR FRESHERS
PPT
Db2
PPTX
IBM MQ Series For ZOS
PDF
Z4R: Intro to Storage and DFSMS for z/OS
DOC
Mainframe interview
PPTX
Skillwise cics part 1
CICS basics overview session-1
JCL MAINFRAMES
JCL FOR FRESHERS
Db2
IBM MQ Series For ZOS
Z4R: Intro to Storage and DFSMS for z/OS
Mainframe interview
Skillwise cics part 1

What's hot (20)

PPT
Basic concept of jcl
PPTX
5. stored procedure and functions
PPTX
Z OS IBM Utilities
PDF
Tso and ispf
PPTX
Ibm db2
DOC
DB2 utilities
DOC
TSO Productivity
PDF
PDF
DB2 for z/OS Architecture in Nutshell
DOC
DB2 DOCUMENT
PDF
Db2.security.slides
PDF
Jcl
PDF
IMS DC Self Study Complete Tutorial
PDF
Docker volume
PDF
Docker in real life
PPTX
PDF
100 COOL MAINFRAME TIPS
PPTX
Mainframe JCL Part - 1
PDF
Practical Recipes for Daily DBA Activities using DB2 9 and 10 for z/OS
PPTX
Job Control Language
Basic concept of jcl
5. stored procedure and functions
Z OS IBM Utilities
Tso and ispf
Ibm db2
DB2 utilities
TSO Productivity
DB2 for z/OS Architecture in Nutshell
DB2 DOCUMENT
Db2.security.slides
Jcl
IMS DC Self Study Complete Tutorial
Docker volume
Docker in real life
100 COOL MAINFRAME TIPS
Mainframe JCL Part - 1
Practical Recipes for Daily DBA Activities using DB2 9 and 10 for z/OS
Job Control Language
Ad

Similar to Cics tutorial (20)

PDF
Ibatis tutorial
PDF
Asp.net mvc tutorial
PDF
Mybatis tutorial
PDF
Basics of computers_tutorial
PDF
Basics of computers_tutorial
PDF
Data communication computer_network_tutorial
PDF
Data communication computer_network_tutorial
PDF
Data communication computer_network_tutorial
PDF
data_communication_computer_network_tutorial.pdf
PDF
Database Management System Tutorial
PDF
Objective c tutorial
PDF
Dbms tutorial
PDF
Dbms tutorial
PDF
Dbms tutorial2020
PDF
Excel tutorial
PDF
Excel tutorial
PDF
Jdbc tutorial
PDF
Cprogramming tutorial
PDF
redis_tutoria0l for new learners step from scratch.pdf
PDF
Salesforce tutorial lec 09
Ibatis tutorial
Asp.net mvc tutorial
Mybatis tutorial
Basics of computers_tutorial
Basics of computers_tutorial
Data communication computer_network_tutorial
Data communication computer_network_tutorial
Data communication computer_network_tutorial
data_communication_computer_network_tutorial.pdf
Database Management System Tutorial
Objective c tutorial
Dbms tutorial
Dbms tutorial
Dbms tutorial2020
Excel tutorial
Excel tutorial
Jdbc tutorial
Cprogramming tutorial
redis_tutoria0l for new learners step from scratch.pdf
Salesforce tutorial lec 09
Ad

More from HarikaReddy115 (20)

PDF
Data structures algorithms_tutorial
PDF
Wireless communication tutorial
PDF
Cryptography tutorial
PDF
Cosmology tutorial
PDF
Control systems tutorial
PDF
Computer logical organization_tutorial
PDF
Computer fundamentals tutorial
PDF
Compiler design tutorial
PDF
Communication technologies tutorial
PDF
Biometrics tutorial
PDF
Behavior driven development_tutorial
PDF
Basics of computer_science_tutorial
PDF
Basic electronics tutorial
PDF
Auditing tutorial
PDF
Artificial neural network_tutorial
PDF
Artificial intelligence tutorial
PDF
Antenna theory tutorial
PDF
Analog communication tutorial
PDF
Amplifiers tutorial
PDF
Agile tutorial
Data structures algorithms_tutorial
Wireless communication tutorial
Cryptography tutorial
Cosmology tutorial
Control systems tutorial
Computer logical organization_tutorial
Computer fundamentals tutorial
Compiler design tutorial
Communication technologies tutorial
Biometrics tutorial
Behavior driven development_tutorial
Basics of computer_science_tutorial
Basic electronics tutorial
Auditing tutorial
Artificial neural network_tutorial
Artificial intelligence tutorial
Antenna theory tutorial
Analog communication tutorial
Amplifiers tutorial
Agile tutorial

Recently uploaded (20)

PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Classroom Observation Tools for Teachers
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
Institutional Correction lecture only . . .
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Business Ethics Teaching Materials for college
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
01-Introduction-to-Information-Management.pdf
Microbial diseases, their pathogenesis and prophylaxis
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Classroom Observation Tools for Teachers
Abdominal Access Techniques with Prof. Dr. R K Mishra
Week 4 Term 3 Study Techniques revisited.pptx
Institutional Correction lecture only . . .
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Pharma ospi slides which help in ospi learning
2.FourierTransform-ShortQuestionswithAnswers.pdf
Cell Structure & Organelles in detailed.
STATICS OF THE RIGID BODIES Hibbelers.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Module 4: Burden of Disease Tutorial Slides S2 2025
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPH.pptx obstetrics and gynecology in nursing
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Business Ethics Teaching Materials for college
VCE English Exam - Section C Student Revision Booklet
01-Introduction-to-Information-Management.pdf

Cics tutorial

  • 1. 0
  • 2. CICS i AbouttheTutorial CICS stands for Customer Information Control System. CICS was developed in 1968 by IBM. CICS allows users to develop and execute online application in an MVS environment. CICS has become the most commonly used server for Internet applications. CICS is a transaction processing system which is also called as Online Transaction Processing (OLTP) Software. CICS is a data communication system that can support a network containing hundreds of terminals. Audience This tutorial is designed for software programmers who would like to understand the concepts of CICS starting from scratch. This tutorial will give you enough understanding on CICS from where you can take yourself to higher levels of expertise. Prerequisites Before proceeding with this tutorial, you should have a basic understanding of COBOL programming. A basic knowledge of MVS and TSO/ISPF subsystem will help you grasp the concepts of CICS better. Disclaimer&Copyright  Copyright 2015 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute, or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness, or completeness of our website or its contents including this tutorial. If you discover any errors on our website or in this tutorial, please notify us at contact@tutorialspoint.com
  • 3. CICS ii TableofContents About the Tutorial..................................................................................................................................i Audience ................................................................................................................................................i Prerequisites ..........................................................................................................................................i Disclaimer & Copyright...........................................................................................................................i Table of Contents ..................................................................................................................................ii 1. CICS – OVERVIEW...............................................................................................................1 Functions of CICS...................................................................................................................................1 Features of CICS.....................................................................................................................................2 2. CICS – ENVIRONMENT .......................................................................................................3 CICS Environment..................................................................................................................................3 Data Communication Services ...............................................................................................................4 Data Handling Services ..........................................................................................................................4 Application Programming Services ........................................................................................................4 Monitoring Services...............................................................................................................................5 3. CICS – BASIC TERMS...........................................................................................................6 IBM 3270 Terminal ................................................................................................................................6 CRT Monitor..........................................................................................................................................6 Keyboard...............................................................................................................................................7 Transaction............................................................................................................................................8 Task.......................................................................................................................................................8 LUW.......................................................................................................................................................9 Application ............................................................................................................................................9 4. CICS – NUCLEUS...............................................................................................................10 Control Programs ................................................................................................................................10 TCP......................................................................................................................................................10 KCP......................................................................................................................................................10
  • 4. CICS iii PCP......................................................................................................................................................10 FCP ......................................................................................................................................................10 SCP ......................................................................................................................................................11 Control Tables .....................................................................................................................................11 TCT ......................................................................................................................................................11 PCT......................................................................................................................................................11 PPT......................................................................................................................................................11 FCT ......................................................................................................................................................12 Transaction..........................................................................................................................................12 Transaction Life Cycle..........................................................................................................................13 5. CICS – TRANSACTIONS .....................................................................................................16 CESN....................................................................................................................................................16 CEDA ...................................................................................................................................................16 CEMT...................................................................................................................................................16 CECI .....................................................................................................................................................17 CEDF....................................................................................................................................................18 CMAC ..................................................................................................................................................18 CESF.....................................................................................................................................................18 CEBR....................................................................................................................................................18 CICS Concepts......................................................................................................................................19 Multitasking........................................................................................................................................19 Multi-threading...................................................................................................................................19 Re-entrancy.........................................................................................................................................19 Quasi-reentrancy ................................................................................................................................19 6. CICS – COBOL BASICS.......................................................................................................20 CICS Program.......................................................................................................................................20 Program Compilation ..........................................................................................................................22 7. CICS – BMS.......................................................................................................................24 Formatted Screen................................................................................................................................24 BMS Basic Terms .................................................................................................................................25 Map.....................................................................................................................................................25
  • 5. CICS iv Mapset................................................................................................................................................25 BMS Macros........................................................................................................................................25 8. CICS – MAP ......................................................................................................................31 Physical Map .......................................................................................................................................31 Symbolic Map......................................................................................................................................32 Skipper and Stopper Field....................................................................................................................32 Skipper Field .......................................................................................................................................32 Stopper Field.......................................................................................................................................33 Attribute Byte......................................................................................................................................33 Modified Data Tag...............................................................................................................................34 Send Map ............................................................................................................................................34 Receive Map........................................................................................................................................36 Mapset Execution................................................................................................................................36 9. CICS – INTERFACE BLOCK.................................................................................................38 Restricted COBOL Verbs ......................................................................................................................38 Execute Interface Block .......................................................................................................................38 EIB Fields .............................................................................................................................................39 CICS Programs Classification................................................................................................................39 Non Conversion Programs ..................................................................................................................39 Conversion Program............................................................................................................................40 10. CICS – PSEUDO PROGRAMMING......................................................................................43 Pseudo-Conversion Program ...............................................................................................................43 Pseudo Conversion Techniques ...........................................................................................................44 COMMAREA........................................................................................................................................44 DFHCOMMAREA .................................................................................................................................45 Pseudo Code........................................................................................................................................45 Advantages of Pseudo Conversion.......................................................................................................48 Return Statements ..............................................................................................................................48 Return-1..............................................................................................................................................48
  • 6. CICS v Return-2..............................................................................................................................................48 11. CICS – AID KEYS................................................................................................................49 Validating AID keys..............................................................................................................................49 DFHAID................................................................................................................................................49 Cursor Positioning ...............................................................................................................................51 Dynamically Modifying Attributes .......................................................................................................51 12. CICS – FILE HANDLING......................................................................................................54 Random Access....................................................................................................................................54 Read ....................................................................................................................................................54 Read Command Options.....................................................................................................................56 Read Command Exceptions ................................................................................................................57 Write ...................................................................................................................................................57 Write Command Exceptions ...............................................................................................................58 Rewrite................................................................................................................................................59 Rewrite Command Exceptions............................................................................................................60 Delete..................................................................................................................................................60 Delete Command Exceptions..............................................................................................................62 Sequential Access................................................................................................................................62 STARTBR..............................................................................................................................................62 READNEXT / READPREV.......................................................................................................................63 RESETBR ..............................................................................................................................................63 ENDBR.................................................................................................................................................64 13. CICS – ERROR HANDLING.................................................................................................65 CICS Errors...........................................................................................................................................65 Error Handling Commands...................................................................................................................65 Handle Condition.................................................................................................................................65 Handle Abend......................................................................................................................................66 Abend..................................................................................................................................................67
  • 7. CICS vi Ignore Condition..................................................................................................................................68 Nohandle.............................................................................................................................................68 14. CICS – CONTROL OPERATIONS.........................................................................................70 Program Logical Levels ........................................................................................................................70 XCTL ....................................................................................................................................................71 Link......................................................................................................................................................72 Load ....................................................................................................................................................72 Release................................................................................................................................................73 Return .................................................................................................................................................73 Interval Control Operations.................................................................................................................73 ASKTIME..............................................................................................................................................73 FORMATTIME......................................................................................................................................73 15. CICS – TEMPORARY STORAGE..........................................................................................75 COMMAREA ........................................................................................................................................75 Common Work Area............................................................................................................................75 Transaction Work Area........................................................................................................................75 Temporary Storage Queue ..................................................................................................................75 WRITEQ TS...........................................................................................................................................76 READQ TS ............................................................................................................................................76 DELETEQ TS .........................................................................................................................................77 Transient Data Queue..........................................................................................................................77 WRITEQ TD..........................................................................................................................................77 READQ TD............................................................................................................................................77 DELETEQ TD.........................................................................................................................................78 16. CICS – INTERCOMMUNICATION.......................................................................................79 Benefits of Intercommunication..........................................................................................................79
  • 8. CICS vii Basic Terminologies.............................................................................................................................79 Intercommunication Methods.............................................................................................................80 17. CICS – STATUS CODES......................................................................................................81 18. CICS – INTERVIEW QUESTIONS.........................................................................................82
  • 9. CICS 8 CICS is a DB/DC system which is used in online applications. CICS was developed because batch operating system can execute only batch programs. CICS programs can be written in COBOL, C, C++, Java, etc. These days, users want information within seconds and in real time. To provide such quick service, we need a system which can process information online. CICS allows users to communicate with the back-end system to get the desired information. Examples of online programs include online banking system, flight reservation, etc. Following image shows the components of CICS and how they are inter-related: FunctionsofCICS The main functions performed by CICS in an application are as follows:  CICS manages requests from concurrent users in an application.  Although, multiple users are working on CICS system but it gives a feel to user that he is the single user only.  CICS gives the access to data files for reading or updating them in an application. 1. CICS – OVERVIEW
  • 10. CICS 9 FeaturesofCICS The features of CICS are as follows:  CICS is an operating system in itself, as it manages its own processor storage, has its own task manager which handles execution of multiple programs, and provides its own file management functions.  CICS provides online environment in batch operating system. Jobs submitted are executed immediately.  CICS is a generalized transaction processing interface.  It is possible to have two or more CICS regions at the same time, as CICS runs as a batch job in the operating system at the back-end.
  • 11. CICS 10 CICS itself acts as an operating system. Its job is to provide an environment for online execution of application programs. CICS runs in one region or partition or address space. CICS handles scheduling for programs running under it. CICS runs as a batch job and we can view it in the spool by issuing the command PREFIX CICS*. There are five major services which are provided by CICS. All these services together perform a task. CICSEnvironment Following are the services which we will be discussing in detail step by step:  System Services  Data Communication Services  Data Handling Services  Application Programming Services  Monitoring Services  System Services CICS maintains control functions to manage the allocation or de-allocation of resources within the system which are as follows:  Task Control – Task control provides task scheduling and multitasking features. It takes care of the status of all CICS tasks. Task Control allocates the processor time among concurrent CICS tasks. This is called multitasking. CICS tries to prioritize the response time to the most important task.  Program Control – Program Control manages loading and releasing of application programs. As soon as a task begins, it becomes necessary to associate the task with the appropriate application program. Although many tasks may need to use the same application program, CICS loads only one copy of the code into memory. Each task threads its way through this code independently, so many users can all be running transactions that are concurrently using the same physical copy of an application program. 2. CICS – ENVIRONMENT
  • 12. CICS 11  Storage Control – Storage Control manages acquiring and releasing of main storage. Storage control acquires, controls, and frees dynamic storage. Dynamic storage is used for input/output areas, programs, etc.  Interval Control – Interval Control offers timer services. DataCommunicationServices Data Communication Services interface with telecommunication access methods such as BTAM, VTAM, and TCAM for handling data communication requests from application programs.  CICS releases application programs from the burden of dealing with terminal hardware issues through the use of Basic Mapping Support (BMS).  CICS provides Multi Region Operation (MRO) through which more than one CICS region in the same system can communicate.  CICS provides Inter System Communication (ISC) through which a CICS region in a system can communicate with the CICS region on another system. DataHandlingServices Data Handling Services interface with data access methods such as BDAM, VSAM, etc.  CICS facilitates servicing of data handling requests from application programs. CICS provides application programmers a set of commands for dealing with data set and database access and related operations.  Data Handling Services interfaces with database access methods such as IMS/DB, DB2, etc. and facilitate servicing of database requests from application programs.  CICS facilitates management of data integrity by control of simultaneous record updates, protection of data as task ABENDs and protection of data at system failures.
  • 13. CICS 12 ApplicationProgrammingServices Application Programming Services interface with application programs. The application programming services of CICS provide features such as command level translation, CEDF (the debug facility) and CECI (the command interpreter facility). We will be discussing more in detail in upcoming modules. MonitoringServices Monitoring Services monitor various events within CICS address space. It provides series of statistical information that can be used for system tuning.
  • 14. CICS 13 We must have knowledge of the basic terms used in CICS to get a better understanding of how it works. Application programs use CICS for communication with remote and local terminals and subsystems. IBM3270Terminal The 3270 Information Display System is a family of display and printer terminals. 3270 terminals were being used to connect to the mainframe via IBM controllers. Today, 3270 emulation software is available which means that even normal PCs can be used as 3270 terminals. 3270 terminals are dumb terminals and do not do any processing themselves. All processing needs to be done by the application program. IBM terminals consist of the following components: CRTMonitor The CRT monitor displays the output or the input fields of the application program. A screenshot of a 3278 Model of CRT monitor is shown below. It has the following characteristics:  It is capable of displaying 1920 characters.  Each of these 1920 character positions is individually addressable.  A COBOL application program can send data to all the positions on the screen.  The display characteristics like intensity, protected, non-protected of the field can be set using BMS which we will be discussing in detail in upcoming modules. 3. CICS – BASIC TERMS
  • 15. CICS 14 Keyboard IBM keyboard keys are divided into following two categories:  Non-AID Keys – All other keys for alphabets, numeric, punctuation etc. are Non-Aid keys. When the user types text or numbers using non-aid keys, CICS will not even know if the user is typing anything or not.  AID Keys – AID keys are known as Attention Identifier Keys. CICS can detect only AID keys. After typing all the input, only when the user presses one of the AID keys, CICS takes control. AID Keys : ENTER, PF1 to PF24, PA1 to PA3, CLEAR. AID keys are further divided into two categories: o PF Keys – PF keys are known as function keys. PF keys allow transfer of data from terminal to CICS. PF Keys are ENTER and PF1 to PF24. o PA Keys – PA keys are known as Program Access keys. PA keys do not allow transfer of data between terminal and CICS. PA Keys are PA1 to PA3 and CLEAR.
  • 16. CICS 15 Transaction A CICS program is invoked through a transaction. A CICS transaction is a collection of logically related programs in an application. The whole application could be logically divided into several transactions.  Transaction identifiers which are 1 to 4 characters long are used to identify the transactions which the users want to do.  A programmer links one program to the transaction identifier which is used to invoke all the application programs for that particular transaction. Task A Task is a unit of work which is specific to a user.  Users invoke an application by using one of the transaction identifiers. CICS looks up for the transaction identifier to find out which program to invoke first to do the work requested. It creates a task to do the work, and transfers control to the mentioned program.  A transaction can be completed through several tasks.  A task can receive data from and send data to the terminal that started it. It can read and write files and can start other tasks also.
  • 17. CICS 16 Task vs. Transaction The difference between a transaction and a task is that several users can invoke a transaction but each user initiates his own task. LUW LUW stands for Logical Unit of Work. LUW states that a piece of work should be done completely or not done at all. A task can contain several Logical Unit of Works in CICS. We will discuss more about it in upcoming modules. Application An application is a series of logically grouped programs to form several transactions which is used to complete a specific task for the end-user.
  • 18. CICS 17 The five CICS system components described earlier are a convenient grouping of CICS system programs, each of which performs its own specialized functions. The core of CICS known as the CICS Nucleus which consists of IBM-supplied CICS Control Programs and Control Tables. ControlPrograms CICS nucleus is constructed by the control programs and corresponding control tables. It provides unique advantages. It makes the CICS system highly flexible and thus easy to maintain. Following are the important control programs of CICS: TCP TCP is known as Terminal Control Program.  TCP is used to receive messages from the terminal.  It maintains hardware communication requirements.  It requests CICS to initiate the tasks. KCP KCP is known as Task Control Program.  KCP is used to simultaneously control the execution of tasks and its related properties.  It handles all the issues related to multi-tasking. PCP PCP is known as Program Control Program.  PCP is used to locate and load programs for execution.  It transfers the control between programs and in the end, it returns the control back to the CICS. 4. CICS – NUCLEUS
  • 19. CICS 18 FCP FCP is known as File Control Program.  FCP is used to provide application programs with services like read, insert, update or delete records in a file.  It keeps exclusive control over the records in order to maintain data integrity during record updates. SCP SCP is known as Storage Control Program. It is used to control allocation and de- allocation of storage within a CICS region. ControlTables CICS consists of IBM-supplied CICS control programs and tables. These tables need to be updated accordingly with the application information for successful execution of CICS application programs. Following are the important Control Tables: TCT TCT is known as Terminal Control Table.  When we login to a CICS terminal, an entry is made in the TCT table.  TCT contains the terminal ID's that are connected to current CICS region.  Terminal Control Program along with terminal control table recognize the incoming data from the terminal. PCT PCT is known as Program Control Table.  It contains the Transaction IDs (TRANSID) and the corresponding program names or program IDs.  TRANSID is unique in PCT table.
  • 20. CICS 19 PPT PPT is known as Processing Program Table. PPT contains Program name or Mapset name, Task Use Counter, Language, Size, Main storage address, Load library address, etc.  Program or Mapset name is unique in a PPT table.  CICS receives the transaction and a corresponding program name is allocated to the transaction from the PCT. It checks if the program is loaded or not. If it is loaded, then the task use counter is increased by 1. If the program is not loaded, then the program is first loaded and the task use counter is set to 1. It gets the load library address from the PPT table. FCT FCT is known as File Control Table.  It contains File names, File type, record length, etc.  All the files used in a CICS program must be declared in FCT and they are opened and closed by CICS itself. Transaction When a transaction identifier TP02 is entered on the CICS terminal, first it checks if there is a program associated with this Transaction identifier in the PCT table. If it finds one, then it checks in the PPT table to find the location of the Program to execute it. If the program is already available in the memory, it starts executing that particular program; if not, it loads the program to the memory from the secondary storage and then starts executing it.
  • 22. CICS 21 TransactionLifeCycle The transaction life cycle has the following steps: Step 1 The terminal operator initiates the transaction by typing a 1 to 4-character transaction-id and pressing the ENTER key. Step 2 The TCP periodically checks all the terminals for input. When a message is received, it does the following:  Instructs the SCP to create a TIOA.  Places the message in the TIOA.
  • 23. CICS 22 End of ebook preview If you liked what you saw… Buy it from our store @ https://store.tutorialspoint.com