CICS

CICS

Top Interview Questions

About CICS

 

CICS Overview

CICS (Customer Information Control System) is a transaction processing system developed by IBM that enables high-volume online transaction processing (OLTP) in mainframe environments. It is a robust and reliable system that has been used by large enterprises for decades, particularly in banking, finance, insurance, and government sectors, where handling massive numbers of transactions securely and efficiently is critical.

CICS is not an application itself but a transaction server that provides a runtime environment for applications. These applications can be written in programming languages such as COBOL, PL/I, C, Java, and more recently, modern languages via Java EE. The system handles communication between user terminals, application programs, databases, and other systems.

The key strength of CICS lies in its ability to process thousands of transactions per second with high availability, security, and consistency, making it a backbone for mission-critical enterprise applications.


History of CICS

CICS was introduced by IBM in the late 1960s, initially targeting IBM mainframes. The original design goal was to manage real-time transaction processing for IBM 360 systems, which were widely used in banking and commercial applications. Over the decades, CICS evolved to support modern requirements:

  • CICS Version 1 (1968): Basic support for online transaction processing.

  • CICS VS (1972): Introduced support for Virtual Storage (VS) mainframe systems.

  • CICS TS (Transaction Server): Modern releases support multiple platforms including z/OS, z/VSE, and z/VM, integrating with TCP/IP networks, web services, and Java applications.

Despite its age, CICS remains relevant due to its adaptability, reliability, and integration capabilities with modern technologies.


Architecture of CICS

CICS operates as a multi-region transaction server (MRTS) architecture in a mainframe environment. It consists of the following core components:

  1. Terminal Control: Handles communication with user terminals or clients, typically via 3270 terminals or web interfaces.

  2. Program Control: Manages execution of application programs. CICS schedules programs and ensures transaction integrity.

  3. File Control: Provides access to VSAM (Virtual Storage Access Method) files and other database systems such as DB2 or IMS.

  4. Task Control: CICS processes each user request as a task, managing task initiation, scheduling, and termination.

  5. Resource Control: Manages system resources like files, queues, and databases.

  6. Transaction Control: Ensures transactions are atomic, consistent, isolated, and durable (ACID properties).

CICS also supports regions, which are logical partitions of resources, allowing multiple CICS applications to run independently while sharing system resources efficiently.


Key Features of CICS

CICS provides a wide range of features that make it a powerful transaction processing environment:

  1. High Performance: CICS can process thousands of transactions per second with minimal delay, making it ideal for high-volume industries like banking.

  2. Reliability and Availability: It provides continuous operation with minimal downtime and supports recovery from system failures.

  3. Security: CICS integrates with RACF (Resource Access Control Facility) for robust access control and authentication.

  4. Scalability: CICS scales easily to accommodate growing transaction volumes by distributing workloads across multiple regions.

  5. Multi-Language Support: Applications can be written in COBOL, PL/I, C, C++, Java, and other modern languages.

  6. Integration Capabilities: CICS can interact with web services, MQ messaging, REST APIs, and other enterprise systems.

  7. Transaction Management: Supports ACID properties to ensure transactions are reliable and consistent.

  8. Data Access: Provides APIs for accessing VSAM, DB2, IMS, and other databases.

  9. Dynamic Resource Allocation: CICS optimizes system resources dynamically to improve efficiency and reduce bottlenecks.


CICS Transactions

A transaction in CICS represents a logical unit of work, such as updating a bank account, placing an order, or retrieving customer information. CICS provides a transaction processing environment that ensures each transaction is completed successfully or rolled back in case of failure.

Types of CICS transactions:

  1. Online Transaction: Initiated by a user via a terminal or web interface.

  2. Batch Transaction: Processes large sets of data in bulk.

  3. Message-Driven Transaction: Triggered by messages from MQ Series or other messaging systems.

  4. Program-Controlled Transaction: Triggered by other programs or scheduled processes.

CICS uses a transaction identifier (TRNID) to recognize and route requests to the appropriate application program.


CICS Programming Model

CICS applications are generally structured as follows:

  1. Programs: Written in COBOL, PL/I, C, or Java. Programs contain business logic to process requests.

  2. Maps (BMS – Basic Mapping Support): Define user interfaces for 3270 terminals.

  3. Transactions: Define entry points to application programs and specify the resources they can access.

  4. Resources: Include files, queues, and databases that programs interact with.

CICS provides APIs such as EXEC CICS commands, which applications use to interact with CICS resources. Examples include:

  • EXEC CICS READ – Reads a record from a file.

  • EXEC CICS WRITE – Writes a record to a file.

  • EXEC CICS LINK – Calls another program within the same CICS environment.

  • EXEC CICS START – Starts a new transaction.

The programming model emphasizes task-based execution, where each transaction is handled as an isolated task, ensuring reliability and concurrency.


CICS Data Management

CICS is highly efficient in managing data. It primarily supports:

  1. VSAM (Virtual Storage Access Method): The standard file access method in mainframes.

  2. DB2 Database: SQL-based relational database support for large-scale enterprise applications.

  3. IMS Database: Hierarchical database management for legacy applications.

  4. Transient Data Queues (TDQs): For temporary data storage between tasks.

  5. Temporary Storage Queues (TSQs): For inter-task communication and message passing.

CICS provides a two-phase commit protocol to ensure data integrity across multiple resources, guaranteeing that all changes are committed together or none at all.


CICS Modernization

While CICS was initially built for 3270 terminal-based systems, it has evolved to support modern architectures:

  1. Web Integration: CICS supports HTTP, SOAP, and REST interfaces, allowing web applications to interact with mainframe applications.

  2. Java EE Support: CICS provides a runtime for Java applications with access to CICS resources.

  3. Cloud and API Integration: Modern CICS supports cloud services, API gateways, and microservices architectures.

  4. DevOps and Automation: Integration with CI/CD pipelines, automated testing, and deployment tools.

This modernization ensures that legacy CICS applications remain relevant in contemporary enterprise IT landscapes.


CICS Benefits

  1. High Throughput: Can handle thousands of concurrent users efficiently.

  2. Reliability: Provides near-zero downtime with strong recovery mechanisms.

  3. Security: Integrated with mainframe security systems.

  4. Resource Optimization: Efficiently manages CPU, memory, and I/O resources.

  5. Transaction Integrity: Ensures ACID-compliant operations.

  6. Enterprise Integration: Works seamlessly with other enterprise applications and modern technologies.

 

Fresher Interview Questions

 

1. What is CICS?

Answer:
CICS (Customer Information Control System) is a transaction processing system developed by IBM. It is mainly used on mainframe systems for online transaction processing (OLTP). CICS allows multiple users to simultaneously access databases and applications, providing high-speed and reliable transaction management.


2. What are the main features of CICS?

Answer:
Key features of CICS include:

  • High Performance: Handles thousands of transactions per second.

  • Online Transaction Processing: Supports real-time transactions.

  • Reliability and Availability: Provides fault tolerance and recovery mechanisms.

  • Scalability: Can handle a large number of concurrent users.

  • Resource Management: Manages files, queues, and databases efficiently.

  • Security: Provides user authentication and authorization mechanisms.


3. What are the different types of CICS applications?

Answer:
CICS applications can be categorized into:

  1. Online Applications: Real-time transaction processing (e.g., banking transactions).

  2. Batch Applications: Programs that run in batches and are scheduled.

  3. Mixed Applications: Combination of online and batch processes.


4. What are CICS transactions?

Answer:
A transaction is a unit of work in CICS that performs a specific task. Each transaction has a unique Transaction ID (TID), typically 4 characters long. CICS ensures that transactions are atomic, meaning they either complete successfully or are rolled back in case of failure.


5. What is a CICS region?

Answer:
A CICS region is an address space on a mainframe where CICS runs. It contains all the CICS resources like programs, files, and terminals. Multiple regions can exist to handle different workloads, such as primary regions and satellite regions.


6. What are CICS programs?

Answer:
CICS programs are the applications executed within CICS. They can be written in languages like COBOL, PL/I, or Assembler. Programs interact with CICS resources like files, queues, and databases using CICS commands.


7. What are CICS files?

Answer:
CICS files are the data storage resources used by CICS applications. They can be:

  • VSAM Files: Key-sequenced or relative files.

  • Non-VSAM Files: Sequential files.

  • DB2 Tables: Accessed via CICS-DB2 interface.

CICS provides file control commands like READ, WRITE, REWRITE, and DELETE.


8. What is a CICS map?

Answer:
A map is a screen layout used to display information to the user on a terminal. Maps are defined using BMS (Basic Mapping Support) and allow input/output between the terminal and the CICS program.


9. What are CICS terminals?

Answer:
Terminals are end-user devices connected to the mainframe to interact with CICS applications. They can be physical terminals (like 3270 screens) or virtual terminals (web-based interfaces).


10. What are CICS queues?

Answer:
CICS provides message queues to enable asynchronous communication. Types include:

  • Transient Data Queues (TDQ): Temporary messages stored in memory.

  • Temporary Storage Queues (TSQ): Store messages temporarily for later retrieval.


11. What is a CICS resource?

Answer:
A resource is any object that CICS manages, such as:

  • Files

  • Programs

  • Queues

  • Terminals

  • Transactions

Resources are defined in CICS tables and accessed using CICS commands.


12. Explain CICS Command Level Programming.

Answer:
CICS provides a set of commands for application programming, such as:

  • EXEC CICS READ/WRITE: File operations

  • EXEC CICS SEND/RECEIVE: Terminal communication

  • EXEC CICS LINK: Call another program

  • EXEC CICS START: Initiate a transaction


13. What is CICS COMMAREA?

Answer:
COMMAREA is a communication area used to pass data between CICS programs or transactions. It is defined by the programmer and can carry any information like input/output data.


14. What is a CICS transaction ID?

Answer:
A transaction ID (TID) is a unique 4-character identifier assigned to each CICS transaction. It is used to initiate, monitor, and manage transactions.


15. What is the difference between a transient data queue and temporary storage queue?

Feature Transient Data Queue (TDQ) Temporary Storage Queue (TSQ)
Purpose Messaging Temporary storage of data
Lifetime Until read Until explicitly deleted
Retrieval FIFO or by key By key or sequential
Usage Messaging between programs Staging data for later processing

16. What are the different ways to invoke a CICS program?

Answer:

  • Via Terminal (TID): User initiates the transaction.

  • Program Link (EXEC CICS LINK): Call another program synchronously.

  • START Transaction (EXEC CICS START): Call asynchronously.

  • From a Batch Job: Using CICS batch interfaces.


17. What is CICS Run-Time Control?

Answer:
CICS Run-Time Control manages transaction execution, resource allocation, and program flow. It ensures concurrency, integrity, and recovery of transactions.


18. What are CICS recovery mechanisms?

Answer:
CICS provides robust recovery features:

  • Commit and rollback: Ensures transactions are atomic.

  • Automatic restart: Restarts interrupted transactions.

  • File Recovery: Uses journaling or VSAM recovery.

  • Terminal Recovery: Handles terminal errors gracefully.


19. What is CICS Temporary Storage (TS)?

Answer:
Temporary Storage (TS) is an in-memory storage for data used temporarily by CICS transactions. TS data is lost when the region ends unless explicitly saved. It is commonly accessed via EXEC CICS WRITEQ TS/READQ TS commands.


20. What are some common CICS commands used in COBOL?

Answer:

  • EXEC CICS SEND … → Display data on terminal

  • EXEC CICS RECEIVE … → Accept user input

  • EXEC CICS READ … → Read a file or queue

  • EXEC CICS WRITE … → Write to a file or queue

  • EXEC CICS LINK … → Call another program

  • EXEC CICS XCTL … → Transfer control to another program

  • EXEC CICS START … → Start a transaction


21. What is a CICS transaction log?

Answer:
The CICS log maintains a record of all transactions for auditing, debugging, and recovery. It helps in recovering committed and uncommitted transactions in case of system failure.


22. What is a CICS mapset?

Answer:
A mapset is a collection of related BMS maps used to interact with a terminal. Each mapset may contain multiple screens for input/output.


23. Difference between LINK and XCTL commands

Command Purpose Control Return
LINK Calls another program and returns control Returns to caller
XCTL Transfers control to another program Does NOT return

24. Explain CICS and DB2 integration

Answer:
CICS can interact with DB2 databases using EXEC SQL statements embedded in COBOL programs. It allows online access and updates to DB2 tables while maintaining transaction integrity.


25. What is CICS JCL?

Answer:
CICS JCL is used to start CICS regions on the mainframe. It defines region parameters, memory, and log datasets needed to run CICS.


26. Scenario-Based Question: What happens if a CICS program fails during execution?

Answer:

  • CICS aborts the transaction.

  • It may rollback file changes to maintain integrity.

  • The error is logged in the CICS log.

  • Recovery actions may be triggered if enabled.


27. How can you optimize CICS performance?

Answer:

  • Minimize program linking.

  • Use TS queues efficiently.

  • Reduce terminal I/O operations.

  • Use VSAM file sharing carefully.

  • Avoid unnecessary synchronous calls.


28. What is the difference between EXEC CICS LINK and EXEC CICS START?

Feature LINK START
Type Synchronous Asynchronous
Control Returns Returns to the calling program Does not return
Use Case Call another program and continue Start a new transaction in parallel
Example EXEC CICS LINK PROGRAM('PGM2') EXEC CICS START TRANSACTION('TID2')

29. What is a CICS control table?

Answer:
CICS control tables store definitions of resources such as transactions, files, programs, terminals, and storage queues. The main control tables include:

  • PCT (Program Control Table): Lists all programs in the region.

  • FCT (File Control Table): Lists all files and databases.

  • TCT (Transaction Control Table): Lists all transactions and their properties.

  • TCT (Terminal Control Table): Lists all terminal definitions.


30. Explain CICS BMS (Basic Mapping Support)

Answer:

  • BMS is used to design screens/maps for terminal I/O.

  • It consists of mapsets, which contain one or more maps.

  • A map defines: fields, attributes, and positions on the screen.

  • Commands used with BMS include SEND MAPSET, RECEIVE MAPSET.


31. What is a COMMAREA and why is it used?

Answer:

  • COMMAREA (Communication Area) is used to pass data between CICS programs or between transactions.

  • It is defined by the programmer and can store any kind of data structure.

  • Example: Passing a customer ID from one program to another.


32. What is the difference between a transient data queue (TDQ) and temporary storage queue (TSQ)?

Feature TDQ TSQ
Persistence Lost after read Remains until deleted
Purpose Messaging between programs Temporary storage for processing
Access FIFO or by key By key or sequential
Storage In-memory Can be in memory or on disk

33. What is the difference between CICS and IMS?

Feature CICS IMS
Type Online Transaction Processing Hierarchical Database & Transaction Processing
Application Interactive real-time Batch and online
Database VSAM/DB2 IMS DB
Complexity Easier for OLTP Complex for hierarchical data

34. What is a CICS Temporary Storage (TS) command?

Answer:
CICS TS commands manage temporary storage data. Key commands include:

  • WRITEQ TS → Write data to TS queue

  • READQ TS → Read data from TS queue

  • DELETEQ TS → Delete data from TS queue


35. What is the difference between EXEC CICS XCTL and LINK?

Feature XCTL LINK
Control Transfer Permanent transfer to another program Temporary transfer to another program
Returns Does not return Returns to calling program
Use Case Program chaining Program modularization

36. What is CICS Program Control Table (PCT)?

Answer:

  • PCT contains all programs defined in the CICS region.

  • Each entry specifies program name, location (load library), and type.

  • Used by CICS to locate and execute programs when a transaction is invoked.


37. What is CICS Transaction Control Table (TCT)?

Answer:

  • TCT contains all transaction definitions.

  • Each entry has: transaction ID, program name, terminal ID, and options.

  • CICS uses TCT to validate transactions and route requests.


38. How do you handle errors in CICS programs?

Answer:
Common error-handling techniques include:

  • Check for RETURN codes from EXEC CICS commands.

  • Use HANDLE CONDITION to catch abnormal terminations.

  • Use ABEND codes for system-level failures.

  • Write logs to CICS system log for debugging.


39. What are CICS system commands?

Answer:
CICS system commands are issued by the operator to manage the region. Examples:

  • CEMT INQUIRE STATUS → Check region status

  • CEMT SET TRANSACTION → Enable/disable transactions

  • CEMT SET PROGRAM → Enable/disable programs

  • CEMT INQUIRE TERMINAL → Check terminal status


40. Explain CICS recovery and commit processing

Answer:

  • CICS provides commit and rollback processing to ensure transaction integrity.

  • If a transaction fails, changes to files, databases, or queues are rolled back.

  • Successful transactions are committed, and changes become permanent.


41. What are CICS DB2 commands?

Answer:
CICS programs can access DB2 databases using:

  • EXEC SQL statements embedded in COBOL programs.

  • Use COMMIT and ROLLBACK for transaction control.

  • Commands like EXEC CICS LINK can also invoke DB2 stored procedures.


42. What are the advantages of CICS?

Answer:

  • Handles high-volume transactions efficiently.

  • Supports multiple users simultaneously.

  • Provides reliability and recovery mechanisms.

  • Offers scalability and modular programming.

  • Easy integration with DB2, MQ, and other systems.


43. What are CICS regions types?

Answer:

  1. Primary Region: Handles main transactions.

  2. Terminal-Owning Region: Manages terminal input/output.

  3. Application Region: Hosts applications and batch jobs.

  4. Multiple Regions: For load balancing and high availability.


44. What is a CICS restartable transaction?

Answer:

  • A restartable transaction is one that can be resumed after a failure.

  • CICS logs the transaction’s status, so in case of a system crash, it can restart from the last committed point.


45. What is a CICS transaction monitor?

Answer:

  • A CICS transaction monitor is a software layer that manages transaction execution.

  • It ensures atomicity, consistency, isolation, and durability (ACID).

  • It coordinates programs, resources, and terminals in a region.


46. What are the CICS troubleshooting steps for a program hang?

Answer:

  1. Check CICS logs for error messages.

  2. Verify transaction status using CEMT INQUIRE.

  3. Check deadlocks in TSQ or VSAM files.

  4. Check terminal I/O issues.

  5. Use debug tools like CEDF (CICS Execution Diagnostic Facility).


47. What is CEDF?

Answer:

  • CEDF stands for CICS Execution Diagnostic Facility.

  • It is used to debug CICS programs in real-time.

  • Supports breakpoints, single-step execution, variable inspection, and resource checking.


48. What are the differences between online and batch CICS transactions?

Feature Online Transaction Batch Transaction
Execution Real-time user interaction Scheduled or triggered automatically
Response Immediate Delayed
Input/Output Terminal-based File-based or database
Usage Customer service, banking Reports, updates

49. What is CICS APPLID?

Answer:

  • APPLID (Application ID) identifies a CICS region or application.

  • It helps to start, stop, or manage multiple CICS regions on the same system.


50. What is a CICS DPL (Dynamic Processing Link)?

Answer:

  • DPL allows communication between CICS programs across regions.

  • Enables load balancing and distributed transaction processing.

  • Programs in one region can invoke programs in another region asynchronously.

 

 

Experienced Interview Questions

 

1. What is CICS?

Answer:
CICS (Customer Information Control System) is a transaction processing system from IBM that runs primarily on mainframes. It enables online transaction processing (OLTP) and provides services like data access, transaction management, and communication services. CICS allows multiple users to access and update data concurrently with high reliability.

Key points for 4 years exp:

  • Handles thousands of transactions per second.

  • Works with VSAM, DB2, and IMS for data storage.

  • Supports COBOL, PL/I, Java, and CICS API programs.


2. What are the key components of CICS?

Answer:

  • CICS Region: A logical partition running CICS tasks.

  • Terminal Control: Manages input/output from users.

  • Task: A unit of work processed by CICS.

  • Program: Application logic executed by a task.

  • File Control: Manages data storage (VSAM files, databases).

  • Transient Data (TD) Tables: Temporary data storage during task execution.

  • Transaction Server: Handles transaction initiation and execution.


3. What is a CICS transaction?

Answer:
A transaction is a unit of work initiated by a user through a transaction ID (TRNID).

  • Example: Entering customer details, updating account information.

  • Transactions are atomic, i.e., all or nothing – if a transaction fails, changes are rolled back.

Types of transactions:

  • Local Transaction: Runs entirely in a single CICS region.

  • Distributed Transaction: Runs across multiple regions or systems.


4. What is a CICS Program?

Answer:
A CICS program is an application logic executed in response to a transaction. It can be written in COBOL, PL/I, C, or Java.

Key points:

  • Programs can be statically or dynamically defined in CICS.

  • Can use EXEC CICS commands to interact with files, queues, or terminals.


5. What are CICS Files and File Types?

Answer:
CICS files store persistent data. CICS supports different file types:

  1. VSAM KSDS (Key-Sequenced Data Set) – Key-based access.

  2. ESDS (Entry-Sequenced Data Set) – Sequential access.

  3. RRDS (Relative Record Data Set) – Access by record number.

  4. BDAM (Basic Direct Access Method) – Direct access to physical location.

Tips for 4 years exp:

  • Understand file control commands like READ, WRITE, REWRITE, DELETE.

  • Be ready to discuss locking and recovery mechanisms.


6. Explain CICS Commands like EXEC CICS

Answer:
EXEC CICS commands are used to perform CICS operations in programs.

  • Common commands:

    • READ – read a file record

    • WRITE – write to a file

    • REWRITE – update a record

    • DELETE – delete a record

    • SEND/RECEIVE – handle terminal input/output

    • START – start another program


7. How is CICS different from batch processing?

Answer:

Feature CICS Batch Processing
Processing Online/Real-time Scheduled/Offline
Response Time Immediate Delayed
User Input Terminal input/output File or job input
Concurrency Supports multiple users Sequential
Transactions Atomic May not be atomic

8. What is a CICS Map or BMS (Basic Mapping Support)?

Answer:

  • BMS is used to design screens for terminal-based applications.

  • A Map defines how data is displayed and entered on the terminal.

Key details:

  • Maps are defined using BMS macros (DFHMSD, DFHMDF).

  • CICS programs interact with maps using SEND MAP and RECEIVE MAP.


9. What are CICS Queues?

Answer:
CICS provides temporary storage (TS) queues for inter-task communication:

  • Transient Data Queues (TDQs): FIFO queues for temporary messages.

  • Temporary Storage (TS) Queues: Used to pass data between transactions.

  • Commands: WRITEQ, READQ, DELETEQ.

Use case: Passing messages between batch and online programs.


10. How does CICS handle transactions recovery?

Answer:

  • CICS ensures ACID properties (Atomicity, Consistency, Isolation, Durability).

  • Transaction Recovery: If a transaction fails, CICS rolls back the changes using VSAM/RLS or DB2 logs.

  • Key mechanisms:

    • COMMIT/ROLLBACK in DB2

    • CICS abend recovery


11. What are CICS Regions? Explain different types.

Answer:
A CICS Region is an instance of CICS running in a mainframe.

Types:

  1. Terminal-Owning Region (TOR): Handles user terminals.

  2. Application-Owning Region (AOR): Runs application programs.

  3. File-Owning Region (FOR): Manages files like VSAM.

Tip: For distributed systems, understand AOR-FOR-TOR interactions.


12. Explain CICS Program Control Options

Answer:

  • TASK: Main unit of work in CICS.

  • LINK/START: Call another program.

    • LINK – waits for the called program to finish.

    • START – asynchronous execution, does not wait.

  • RETURN: Ends program and returns control.


13. How do you handle concurrency in CICS?

Answer:

  • Use file or record-level locking (ENQUEUE/DEQUEUE).

  • VSAM handles automatic record-level locking.

  • Use transient data queues for inter-task communication.

  • Consider DB2 isolation levels if database is used.


14. What are common CICS abend codes?

Answer:

  • AEQ – File not available for enqueue.

  • U403 – VSAM file error (record not found).

  • S222 – Temporary storage error.

  • C1C – Program abend due to data exception.

  • 4C1 – Program called a non-existing program.

Tip: For 4 years exp, be ready to analyze dumps and logs.


15. Scenario-based Questions for 4 Years Exp

Q1: How do you handle a scenario where multiple transactions try to update the same VSAM record simultaneously?
Answer:

  • Use CICS ENQ/DEQ to lock the record.

  • Alternatively, enable VSAM record-level locking in the file definition.

  • Ensure proper error handling in case the record is unavailable.

Q2: How do you implement cross-region communication in CICS?
Answer:

  • Use EXEC CICS LINK or START to programs in other regions.

  • For asynchronous processing, temporary storage queues (TSQ) can be used.

  • For DB2 access, use distributed DB2 connections.

Q3: What is your approach to handling a long-running transaction?
Answer:

  • Split it into smaller transactions if possible.

  • Use asynchronous processing with START commands.

  • Monitor for time-outs and deadlocks.


16. Tips for CICS Interview 

  • Know VSAM vs DB2 operations and transaction recovery.

  • Be comfortable with EXEC CICS commands and BMS maps.

  • Understand locking, enqueue, and transient storage concepts.

  • Be ready to explain real-time troubleshooting scenarios like abends and slow transactions.

  • Understand CICS logs, dumps, and monitoring using CEMT, CEDA commands.

 


17. What are the types of CICS programs?

Answer:

  1. Terminal-Oriented Program: Interacts with terminals using BMS maps.

  2. Batch-Style Program: Processes in the background without user interaction.

  3. Command-Level Program: Uses EXEC CICS commands to perform operations.

  4. Web Service / Java Program: Runs in CICS for web-based applications.

Tip: Explain which you have worked on and how you handled transactions in each type.


18. Explain the difference between LINK and XCTL commands.

Feature LINK XCTL
Control return Returns to calling program Control does not return
Usage For subroutine style calls For program transfer
Asynchronous? No No
Example LINK PROGRAM('PROG2') XCTL PROGRAM('PROG2')

Scenario: LINK is used when you want the called program to finish and return results; XCTL is used for flow transfer without returning.


19. What is CICS Temporary Storage?

Answer:
Temporary Storage (TS) in CICS is used for short-lived data storage during or between transactions.

  • Types:

    • Transient Data (TD) Tables: In-memory storage for temporary records.

    • TS Queues: FIFO queues to pass messages between programs.

Commands: WRITEQ, READQ, DELETEQ

Scenario: TS is used for storing a queue of customer requests that are processed asynchronously.


20. Explain CICS Distributed Transactions.

Answer:
Distributed transactions are transactions spanning multiple CICS regions or systems.

  • Ensures atomicity and consistency across systems.

  • Two-phase commit is often used with DB2 integration.

  • Scenario: A transaction updates an account in one region and logs activity in another; both must succeed or fail together.


21. Explain Deadlocks in CICS and how to prevent them.

Answer:
Deadlock: Two or more transactions are waiting for resources held by each other, causing a freeze.

Causes:

  • Multiple programs trying to ENQ the same VSAM records.

  • Improper order of resource acquisition.

Prevention:

  • Use consistent ENQ/DEQ order.

  • Minimize long locks; keep transactions short.

  • Use VSAM record-level locking.

  • Monitor deadlocks using CICS monitoring tools.


22. How do you recover from CICS abends?

Answer:

  • Identify abend code from the dump or CICS logs.

  • Analyze storage dump, program trace, and resource status.

  • Use CEDA commands to check definitions.

  • Roll back transactions if necessary using CICS Recovery commands.

  • Common abend codes for 4-year exp:

    • S222 – Temporary storage issue

    • U403 – VSAM file error

    • 4C1 – Program not found

    • AEQ – Enqueue failed


23. How does CICS handle VSAM files?

Answer:

  • CICS provides file control commands: READ, WRITE, REWRITE, DELETE.

  • Record-level locking prevents concurrent update issues.

  • Recovery: CICS ensures atomicity; if transaction fails, VSAM changes are rolled back.

Advanced Scenario:

  • Handling shared VSAM files across multiple regions using TS queues to avoid record contention.


24. What is BMS (Basic Mapping Support) and its components?

Answer:
BMS is used for screen design in CICS programs.

  • Components:

    1. Mapset – Collection of maps.

    2. Map – Defines input/output fields for a screen.

    3. Attributes: Field-level attributes like protected, numeric, or highlighted.

Example Commands:

  • SEND MAP('MAP1') – Display screen

  • RECEIVE MAP('MAP1') – Accept user input


25. Explain COMMAREA in CICS.

Answer:
COMMAREA is a communication area used to pass data between programs within a CICS region.

  • Defined in DFHCOMMAREA macro.

  • Commonly used with LINK or XCTL commands.

Scenario:

  • Passing customer data from Program A to Program B for further processing.


26. How do you implement a CICS program that interacts with DB2?

Answer:

  • Use EXEC SQL statements within a CICS COBOL or PL/I program.

  • Begin with DB2 CONNECT to establish a connection.

  • Handle COMMIT/ROLLBACK for transaction integrity.

  • Example Flow:

    1. Start transaction via terminal.

    2. Program reads VSAM or user input.

    3. Update DB2 tables using SQL.

    4. Commit transaction.

Scenario:

  • Updating an order status in DB2 while logging the action in CICS temporary storage queue.


27. Explain CICS Queues in detail (Transient Data & Temporary Storage).

Answer:

  • Transient Data Queues (TDQ):

    • FIFO or priority-based queues.

    • Data is lost on system shutdown.

  • Temporary Storage Queues (TSQ):

    • Persistent until explicitly deleted.

    • Useful for asynchronous processing.

Commands: WRITEQ, READQ, DELETEQ, RESETQ

Scenario:

  • TSQ is used to queue transactions overnight for batch processing.


28. How do you monitor CICS transactions and regions?

Answer:

  • Use CEMT commands: CEMT INQUIRE PROGRAM, CEMT INQUIRE FILE

  • Check active tasks using CEMT INQUIRE TASK

  • Use CICS Monitoring Tools: SMF logs, CICS Explorer

  • Analyze response times, throughput, and deadlocks


29. Explain CICS performance tuning techniques.

Answer:

  1. Minimize transaction time – Short transactions reduce locking.

  2. Reduce file I/O – Combine reads/writes efficiently.

  3. Optimize BMS screens – Avoid unnecessary fields.

  4. Use transient data – Instead of frequent VSAM updates.

  5. Monitor queues – Ensure TSQ or TDQ aren’t congested.


30. Explain different CICS transaction routing options.

Answer:

  • Local Routing: Handled within the same CICS region.

  • Remote Routing: Using EXEC CICS LINK or START commands across regions.

  • TCP/IP Routing: For web services integration or MQ connections.

Scenario:

  • User enters data in TOR, which starts processing in AOR and writes results to FOR.


31. What is a CICS Task? Explain its lifecycle.

Answer:
A CICS task is a single execution instance of a transaction.

Task Lifecycle

  1. Transaction Initiation – User enters a transaction ID.

  2. Task Creation – CICS allocates storage.

  3. Program Execution – Application program starts.

  4. Resource Access – Files, DB2, TSQ, TDQ accessed.

  5. Syncpoint Processing – Commit or rollback.

  6. Task Termination – Resources released.

Interview Tip:
Mention short-lived tasks and efficient resource usage to improve throughput.


32. What is Syncpoint in CICS?

Answer:
A syncpoint defines a point of consistency in a transaction.

  • Ensures all updates succeed or fail together

  • Used for transaction recovery

  • Works with VSAM, DB2, MQ

Commands

  • EXEC CICS SYNCPOINT

  • EXEC CICS SYNCPOINT ROLLBACK

Real-time Scenario:
If a DB2 update succeeds but VSAM update fails, a rollback ensures data consistency.


33. What is CICS ENQUEUE and DEQUEUE?

Answer:
ENQ/DEQ commands are used to explicitly lock resources.

  • ENQUEUE – Locks a resource

  • DEQUEUE – Releases the lock

Use Cases

  • Prevent simultaneous updates

  • Avoid data corruption

Example:

EXEC CICS ENQUEUE RESOURCE('CUSTREC')

Tip:
Improper ENQ usage causes deadlocks and performance issues.


34. What is the difference between TSQ and TDQ?

Feature TSQ TDQ
Persistence Exists until deleted Temporary
Access Random Sequential
Restart Recovery Yes No
Usage Inter-transaction Logging, messaging

Project Example:
TSQ used to store multi-screen transaction data.


35. Explain CICS Transaction Isolation.

Answer:
Isolation ensures that one transaction’s updates are not visible to others until commit.

  • Achieved through locking mechanisms

  • DB2 isolation levels apply when DB2 is used

  • VSAM provides record-level locking

Problem Scenario:
Dirty reads prevented by proper isolation control.


36. What is CICS Storage Violation and how do you handle it?

Answer:
Occurs when a program accesses invalid memory.

Causes

  • Incorrect COMMAREA length

  • Pointer misuse

  • Array index overflow

Resolution

  • Use HANDLE ABEND

  • Validate COMMAREA size

  • Analyze dump output


37. Explain HANDLE CONDITION in CICS.

Answer:
HANDLE CONDITION allows graceful error handling.

EXEC CICS HANDLE CONDITION
   NOTFND(100)
   DUPREC(200)
END-EXEC

Benefit:
Avoids abrupt abends and improves user experience.


38. What is CICS Abend? How is it different from System Abend?

Type Description
CICS Abend Application-level failure
System Abend OS or runtime failure

Common CICS Abends

  • AEY9 – DB2 error

  • AEI0 – Duplicate key

  • ASRA – Program exception


39. What is ASRA Abend?

Answer:
ASRA occurs due to program logic errors.

Reasons

  • Divide by zero

  • Invalid pointer

  • Data exception

Fix:

  • Check arithmetic logic

  • Validate input

  • Use compiler debug options


40. Explain CICS Multi-Region Operation (MRO).

Answer:
MRO allows multiple CICS regions to communicate.

Region Types

  • TOR – Terminal ownership

  • AOR – Application execution

  • FOR – File ownership

Advantage:
Improves scalability and performance.


41. How does CICS ensure high availability?

Answer:

  • Multi-region setup

  • Automatic task recovery

  • Data integrity via syncpoints

  • Failover and restart mechanisms


42. What is CICS Interval Control?

Answer:
Used to schedule transactions for future execution.

Commands

  • EXEC CICS START

  • EXEC CICS DELAY

Scenario:
Batch reconciliation triggered after business hours.


43. Explain CICS Program Reentrancy.

Answer:
A reentrant program can be executed by multiple tasks simultaneously.

Rules

  • No self-modifying code

  • No static storage usage

  • Use working storage carefully

Why Important?
Reduces memory usage and improves scalability.


44. Difference between Pseudo-Conversational and Conversational Programs?

Feature Conversational Pseudo
Task Duration Long Short
Resource Usage High Low
Scalability Poor Excellent

Best Practice:
Always implement pseudo-conversational design.


45. How do you secure CICS applications?

Answer:

  • RACF integration

  • Transaction-level security

  • File and program authorization

  • User authentication


46. What is CICS DB2 Thread Pooling?

Answer:
Thread pooling allows reuse of DB2 threads.

Benefits

  • Reduced CPU usage

  • Faster response times

  • Better scalability


47. How do you troubleshoot slow CICS transactions?

Answer:

  1. Check CEMT INQUIRE TASK

  2. Analyze file contention

  3. Review DB2 locks

  4. Check TSQ/TDQ growth

  5. Use CICS monitoring tools


48. Explain CICS Web Services Support.

Answer:
CICS supports REST and SOAP services.

  • JSON/XML processing

  • HTTP/HTTPS communication

  • Integration with modern apps


49. How do you handle version control and deployments in CICS?

Answer:

  • Separate DEV/QA/PROD regions

  • Use CEDA/CSD definitions

  • Promote programs using change management tools


50. Real-Time Project Scenario

Q: Production transaction intermittently fails with AEY9 abend. How do you handle it?

Answer:

  1. Check DB2 SQLCODE

  2. Validate commit/rollback logic

  3. Analyze thread usage

  4. Review recent DB2 changes

  5. Implement retry logic if needed


51. Difference between EXEC CICS and Native COBOL I/O?

Answer:

  • EXEC CICS provides transaction control

  • COBOL I/O lacks recovery and concurrency support

  • EXEC CICS ensures ACID compliance


52. How do you ensure data consistency across VSAM and DB2?

Answer:

  • Use syncpoints

  • Proper error handling

  • Rollback on failure

  • Consistent commit logic


53. What is CICS Storage Protection?

Answer:
Prevents programs from accessing unauthorized memory areas.


54. Explain CICS Task Control.

Answer:

  • Suspend/resume tasks

  • Manage priorities

  • Prevent long-running tasks


55. Why is CICS still used in modern systems?

Answer:

  • High reliability

  • Extremely fast transaction processing

  • Seamless integration with modern APIs

  • Proven scalability