Skip to Content

Mainframe Tutorials

CICS Tutorial

Learn IBM CICS concepts step‑by‑step, from fundamentals to architecture, commands, files, security, performance and real‑time projects.

Start Learning Browse Topics

What you’ll get

  • Clear subtopics with examples
  • Interview questions & answers
  • Real‑time project ideas

CICS Tutorial

0% Complete
Ctrl + K
CICS Tutorial Content
Tutorial Content
Select any subtopic from the left to view it here.

1.1 What is CICS?

CICS (Customer Information Control System) is IBM's online transaction processing (OLTP) monitor used on mainframe systems. It enables applications to process thousands of transactions securely and efficiently in real time.

Previous

1.2 History of CICS

  • Introduced by IBM in 1968.
  • Designed to support online transaction processing.
  • Widely adopted in banking, insurance, retail, and government sectors.
  • Continues to be a critical component of modern mainframe environments.

1.3 Uses of CICS

  • ATM transactions
  • Online banking systems
  • Airline reservation systems
  • Insurance claim processing
  • Government and healthcare applications

Key Features

  • High transaction throughput
  • Fast response times
  • Data integrity and security
  • Integration with DB2, VSAM, MQ, and COBOL applications
  • High availability and reliability

Real-Time Example

When a customer withdraws money from an ATM:

  1. The ATM sends a request.
  2. CICS processes the transaction.
  3. Account details are validated.
  4. Balance is updated.
  5. Response is returned within seconds.
?
Interview Question

Q: What is CICS?

A: CICS is an IBM transaction processing system that manages online business transactions on mainframe computers, ensuring high performance, security, and reliability.

2.1 CICS Architecture Overview

CICS runs inside a region (address space) and provides the core services needed to execute online workloads—transaction routing, program management, storage, file/database access, and security.

  • Front-end: terminals, web, APIs, MQ, etc.
  • CICS services: dispatching, task control, storage control
  • Back-end: VSAM, DB2, IMS, external services

2.2 CICS Components

CICS is made of multiple internal components that work together to manage workload and resources inside the region.

  • Task Control: creates and manages tasks (units of work)
  • Program Control: loads and links application programs
  • File/DB Control: manages access to VSAM and DB2
  • Temporary Storage/TSQ: short-lived data storage
  • Terminal Control / Web / MQ: connectivity options

2.3 CICS Regions

A CICS region is the runtime environment where transactions execute. Organizations commonly use multiple regions to separate workloads and improve availability.

  • TOR: Terminal Owning Region (handles user/terminal connections)
  • AOR: Application Owning Region (runs application programs)
  • FOR: File Owning Region (central file access control)
  • WUI: management interface region for administration

2.4 CICS Control Structures

Control structures are the internal tables and definitions that tell CICS how to run transactions and manage resources.

  • PPT: program definitions (what programs can run)
  • PCT: transaction definitions (maps a trans-id to a program)
  • FCT: file definitions (VSAM file access settings)
  • JCT: journal definitions (logging and recovery)

2.5 CICS File Structure

CICS commonly works with VSAM datasets (KSDS/ESDS/RRDS) and can also integrate with DB2. File definitions control how applications read and update data.

  • Read/Write operations via CICS commands
  • Browse for sequential access
  • Locking and recovery considerations

3.1 CICS Basic Commands

CICS application programs use EXEC CICS commands to communicate with the CICS system. These commands handle tasks like sending screens, reading data, and linking programs.

  • SEND/RECEIVE for terminal I/O
  • READ/WRITE/REWRITE for files
  • LINK/XCTL for program flow
  • RETURN to end or wait for next input

3.2 CICS Operational Commands

Operational commands help manage tasks, timeouts, and system resources. They are used for handling conditions and controlling execution during runtime.

  • HANDLE CONDITION for error handling
  • DELAY for timed waits
  • SYNCPOINT for transaction commit points
  • ASSIGN to get task/transaction information

3.3 CICS Security Commands

CICS integrates with external security managers to control access. Programs and transactions can be protected so only authorized users can execute them.

  • Transaction and program level authorization
  • User sign-on and identity propagation
  • Resource protection for files, queues, and terminals

3.4 CICS File and Data Commands

These commands are used to access VSAM datasets, temporary storage queues, and other data resources safely with CICS-managed recovery.

  • READ/WRITE/REWRITE/DELETE for VSAM records
  • STARTBR/READNEXT/ENDBR for browsing
  • WRITEQ/READQ for temporary storage

4.1 Kinds of Resources

In CICS, a resource is anything that applications use at runtime—transactions, programs, files, queues, terminals, connections, and more.

  • Programs and Transactions
  • Files and Databases
  • Temporary Storage / TSQ
  • Terminals and Connections

4.2 Resource Definitions

Resources are defined so CICS knows how to manage them. Definitions can be loaded from groups and lists and then installed into the region.

  • RDO (Resource Definition Online) via CEDA
  • Groups and Lists for organizing resources
  • Install/Discard to control availability

4.3 Temporary vs Permanent Resources

Some resources exist only while the region is running (temporary), while others are stored in definitions and can be reinstalled after restarts (permanent).

  • Temporary: dynamic queues, transient data, runtime-created items
  • Permanent: defined transactions, programs, files, terminals

4.4 Resource Data Sets

CICS stores and uses various datasets for definitions, logs, and runtime processing. Proper dataset planning is critical for performance and recovery.

  • CICS logstreams / journals for recovery
  • DFHCSD for resource definitions
  • VSAM datasets used by applications

5.1 CICS Program Types

CICS programs are usually written in COBOL (also PL/I, C, Java) and run under CICS control. Some programs handle screens, others handle business logic or file updates.

  • Online programs: driven by transactions
  • Service programs: linked by other programs
  • Pseudo-conversational: common online pattern for scalability

5.2 WRITE and READ Programs

Applications use CICS commands to read and write records or queues. CICS handles locking, recovery, and consistency to protect data.

  • READ a record by key
  • WRITE/REWRITE to create or update data
  • Handle conditions like NOTFND and DUPREC

5.3 Processing Programs

Processing programs implement business rules (validation, calculations, account updates) and coordinate calls to files, DB2, and other services.

Tip: Keep transactions short and commit at clear points to improve throughput.

5.4 Compile and Link CICS Programs

Programs are compiled and link-edited into load libraries. CICS then loads the program at runtime based on definitions.

  • Compile source code (COBOL/PL/I/etc.)
  • Link-edit into a load module
  • Define in CICS (PPT) and install it

6.1 CICS File Concepts

CICS supports high-speed file access with recovery and locking. Many mainframe applications store customer and account data in VSAM.

  • File definitions control dataset name and access mode
  • Recoverability depends on logging and backout settings

6.2 VSAM Files in CICS

VSAM is commonly used for indexed access. CICS can read by key, update records, and browse sequentially within VSAM datasets.

  • KSDS for key-based access
  • ESDS/RRDS for other storage patterns
  • Browse operations for lists and reports

6.3 DFHFILE and File Control

File control in CICS manages open/close, locking, browse positions, and recoverability. Definitions ensure consistent access across regions.

  • Enable/Disable files for maintenance
  • Control update access and sharing
  • Protect integrity with syncpoints

6.4 Sample File Operations

Typical operations include read-by-key, update, and browse. Applications also handle common responses like NOTFND and DUPREC.

  • READ account record
  • REWRITE with updated balance
  • SYNCPOINT to commit changes

7.1 What is a Transaction?

A transaction is a unit of work identified by a transaction ID. It starts a task, runs a program, and returns a response to the user or calling system.

  • Transaction ID maps to a program (via PCT)
  • Runs quickly and safely under CICS control

7.2 Types of Transactions

CICS transactions can be user-driven (terminal), system-driven, or initiated by other systems like MQ and web services.

  • Terminal transactions (BMS screens)
  • Web/service transactions (HTTP/JSON)
  • MQ-triggered transactions

7.3 Transaction Processing in CICS

CICS schedules tasks, dispatches programs, manages resources, and ensures integrity using syncpoints and recovery mechanisms.

Goal: high throughput with predictable response time.

7.4 COMMAREA and Data Passing

COMMAREA is a common method to pass data between programs or across pseudo-conversational steps. It helps maintain state without keeping resources locked for long.

  • Used with LINK/XCTL
  • Passed back to the next transaction step
  • Keep it small for performance

8.1 What are Maps?

Maps define how screens look and behave on 3270 terminals. They control fields and where data appears.

  • Map + attributes = user interface
  • Separate business logic from presentation

8.2 Mapset Creation

A mapset is a compiled collection of maps. It is assembled and linked so CICS can load it at runtime.

  • Define maps in BMS macros
  • Assemble and link-edit mapset
  • Install and use in programs

8.3 BMS and Map Programming

BMS (Basic Mapping Support) helps programs send and receive formatted screens. Programs move data to/from map fields and handle user input.

  • SEND MAP to display data
  • RECEIVE MAP to get user input
  • Validate fields and return messages

9.1 CICS Performance Concepts

Performance in CICS is driven by response time, throughput, CPU usage, and contention on shared resources.

  • Keep transactions short
  • Avoid long file locks
  • Reduce unnecessary I/O

9.2 Monitoring CICS Regions

Monitoring helps detect bottlenecks early—queue build-up, high CPU tasks, excessive waits, or storage issues.

  • Track response time and transaction rates
  • Watch for high suspend/wait times
  • Review file/DB2 activity

9.3 Tuning CICS Applications

Application tuning focuses on reducing calls, improving file access patterns, and ensuring commits happen at the right points.

  • Optimize browse loops and reads
  • Use proper indexing and keys
  • Minimize screen sends

9.4 Performance Tools

Performance tools help capture detailed measurements for analysis—transaction traces, statistics, and resource usage reports.

  • SMF-based statistics
  • Monitoring dashboards
  • Trace and dump analysis

10.1 CICS Security Overview

CICS security ensures only authorized users and programs can access transactions and resources. It typically integrates with an external security manager.

  • Authentication (who you are)
  • Authorization (what you can access)
  • Auditing for compliance

10.2 Users, Groups and Permissions

Access is usually assigned through users and groups. Permissions protect transactions, programs, and datasets to meet policy requirements.

  • Role-based access (groups)
  • Least privilege principle
  • Controlled access to sensitive transactions

10.3 RACF Integration

RACF is commonly used to secure CICS regions. It can protect transactions, programs, and resources and provides strong auditing features.

  • Define resource profiles
  • Grant/deny access via RACF rules
  • Audit access for compliance

10.4 Secure CICS Applications

Secure applications validate input, handle errors safely, and enforce authorization checks for sensitive operations like balance updates.

  • Validate all inputs from screens/APIs
  • Protect update transactions with strong permissions
  • Use proper logging and recovery practices

11.1 Basic Interview Questions

These questions focus on core concepts like region, transaction, program flow, COMMAREA, and common commands.

  • What is a CICS region?
  • What is a transaction ID?
  • Difference between LINK and XCTL?

11.2 Intermediate Questions

Intermediate topics include pseudo-conversational design, syncpoints, file control operations, and performance basics.

  • What is pseudo-conversation?
  • How does SYNCPOINT work?
  • How do you handle NOTFND?

11.3 Advanced Questions

Advanced questions cover multi-region setups, recovery, tuning, and integration with DB2/MQ/HTTP.

  • Explain TOR/AOR/FOR design
  • How does CICS recover after a failure?
  • What metrics do you monitor for tuning?

11.4 Scenario-based Questions

Scenario questions test problem-solving—timeouts, abends, deadlocks, and sudden performance drops.

  • How do you troubleshoot slow transactions?
  • What steps do you take during a file lock issue?
  • How do you handle repeated abends?

12.1 Banking Application Example

A typical banking flow includes balance inquiry and cash withdrawal. CICS coordinates input, business rules, and updates to VSAM/DB2 with strong integrity.

  1. User requests a service (ATM/app)
  2. CICS runs the transaction program
  3. System validates and updates records
  4. Response returned in seconds

12.2 End-to-End CICS Project

An end-to-end project typically includes screen design, COBOL programs, VSAM/DB2 design, definitions in CICS, and test scenarios.

  • Design maps (BMS)
  • Build programs and define transactions
  • Implement validation, updates, and commits

12.3 Student Record System

A student record system project can include create/update/search student records, browse lists, and generate simple reports.

  • Add student details
  • Update marks and courses
  • Browse students by class/section

12.4 Project Deployment

Deployment includes moving load modules and mapsets, installing resource definitions, and validating with controlled test transactions.

  • Promote code through environments
  • Install CICS definitions (groups/lists)
  • Run smoke tests and monitor