Top Interview Questions
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.
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.
CICS operates as a multi-region transaction server (MRTS) architecture in a mainframe environment. It consists of the following core components:
Terminal Control: Handles communication with user terminals or clients, typically via 3270 terminals or web interfaces.
Program Control: Manages execution of application programs. CICS schedules programs and ensures transaction integrity.
File Control: Provides access to VSAM (Virtual Storage Access Method) files and other database systems such as DB2 or IMS.
Task Control: CICS processes each user request as a task, managing task initiation, scheduling, and termination.
Resource Control: Manages system resources like files, queues, and databases.
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.
CICS provides a wide range of features that make it a powerful transaction processing environment:
High Performance: CICS can process thousands of transactions per second with minimal delay, making it ideal for high-volume industries like banking.
Reliability and Availability: It provides continuous operation with minimal downtime and supports recovery from system failures.
Security: CICS integrates with RACF (Resource Access Control Facility) for robust access control and authentication.
Scalability: CICS scales easily to accommodate growing transaction volumes by distributing workloads across multiple regions.
Multi-Language Support: Applications can be written in COBOL, PL/I, C, C++, Java, and other modern languages.
Integration Capabilities: CICS can interact with web services, MQ messaging, REST APIs, and other enterprise systems.
Transaction Management: Supports ACID properties to ensure transactions are reliable and consistent.
Data Access: Provides APIs for accessing VSAM, DB2, IMS, and other databases.
Dynamic Resource Allocation: CICS optimizes system resources dynamically to improve efficiency and reduce bottlenecks.
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:
Online Transaction: Initiated by a user via a terminal or web interface.
Batch Transaction: Processes large sets of data in bulk.
Message-Driven Transaction: Triggered by messages from MQ Series or other messaging systems.
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 applications are generally structured as follows:
Programs: Written in COBOL, PL/I, C, or Java. Programs contain business logic to process requests.
Maps (BMS – Basic Mapping Support): Define user interfaces for 3270 terminals.
Transactions: Define entry points to application programs and specify the resources they can access.
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 is highly efficient in managing data. It primarily supports:
VSAM (Virtual Storage Access Method): The standard file access method in mainframes.
DB2 Database: SQL-based relational database support for large-scale enterprise applications.
IMS Database: Hierarchical database management for legacy applications.
Transient Data Queues (TDQs): For temporary data storage between tasks.
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.
While CICS was initially built for 3270 terminal-based systems, it has evolved to support modern architectures:
Web Integration: CICS supports HTTP, SOAP, and REST interfaces, allowing web applications to interact with mainframe applications.
Java EE Support: CICS provides a runtime for Java applications with access to CICS resources.
Cloud and API Integration: Modern CICS supports cloud services, API gateways, and microservices architectures.
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.
High Throughput: Can handle thousands of concurrent users efficiently.
Reliability: Provides near-zero downtime with strong recovery mechanisms.
Security: Integrated with mainframe security systems.
Resource Optimization: Efficiently manages CPU, memory, and I/O resources.
Transaction Integrity: Ensures ACID-compliant operations.
Enterprise Integration: Works seamlessly with other enterprise applications and modern technologies.
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.
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.
Answer:
CICS applications can be categorized into:
Online Applications: Real-time transaction processing (e.g., banking transactions).
Batch Applications: Programs that run in batches and are scheduled.
Mixed Applications: Combination of online and batch processes.
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.
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.
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.
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.
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.
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).
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.
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.
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
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.
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.
| 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 |
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.
Answer:
CICS Run-Time Control manages transaction execution, resource allocation, and program flow. It ensures concurrency, integrity, and recovery of transactions.
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.
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.
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
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.
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.
| Command | Purpose | Control Return |
|---|---|---|
| LINK | Calls another program and returns control | Returns to caller |
| XCTL | Transfers control to another program | Does NOT return |
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.
Answer:
CICS JCL is used to start CICS regions on the mainframe. It defines region parameters, memory, and log datasets needed to run CICS.
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.
Answer:
Minimize program linking.
Use TS queues efficiently.
Reduce terminal I/O operations.
Use VSAM file sharing carefully.
Avoid unnecessary synchronous calls.
| 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') |
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.
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.
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.
| 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 |
| 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 |
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
| 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 |
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.
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.
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.
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
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.
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.
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.
Answer:
Primary Region: Handles main transactions.
Terminal-Owning Region: Manages terminal input/output.
Application Region: Hosts applications and batch jobs.
Multiple Regions: For load balancing and high availability.
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.
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.
Answer:
Check CICS logs for error messages.
Verify transaction status using CEMT INQUIRE.
Check deadlocks in TSQ or VSAM files.
Check terminal I/O issues.
Use debug tools like CEDF (CICS Execution Diagnostic Facility).
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.
| 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 |
Answer:
APPLID (Application ID) identifies a CICS region or application.
It helps to start, stop, or manage multiple CICS regions on the same system.
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.
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.
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.
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.
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.
Answer:
CICS files store persistent data. CICS supports different file types:
VSAM KSDS (Key-Sequenced Data Set) – Key-based access.
ESDS (Entry-Sequenced Data Set) – Sequential access.
RRDS (Relative Record Data Set) – Access by record number.
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.
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
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 |
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.
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.
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
Answer:
A CICS Region is an instance of CICS running in a mainframe.
Types:
Terminal-Owning Region (TOR): Handles user terminals.
Application-Owning Region (AOR): Runs application programs.
File-Owning Region (FOR): Manages files like VSAM.
Tip: For distributed systems, understand AOR-FOR-TOR interactions.
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.
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.
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.
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.
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.
Answer:
Terminal-Oriented Program: Interacts with terminals using BMS maps.
Batch-Style Program: Processes in the background without user interaction.
Command-Level Program: Uses EXEC CICS commands to perform operations.
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.
| 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.
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.
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.
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.
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
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.
Answer:
BMS is used for screen design in CICS programs.
Components:
Mapset – Collection of maps.
Map – Defines input/output fields for a screen.
Attributes: Field-level attributes like protected, numeric, or highlighted.
Example Commands:
SEND MAP('MAP1') – Display screen
RECEIVE MAP('MAP1') – Accept user input
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.
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:
Start transaction via terminal.
Program reads VSAM or user input.
Update DB2 tables using SQL.
Commit transaction.
Scenario:
Updating an order status in DB2 while logging the action in CICS temporary storage queue.
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.
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
Answer:
Minimize transaction time – Short transactions reduce locking.
Reduce file I/O – Combine reads/writes efficiently.
Optimize BMS screens – Avoid unnecessary fields.
Use transient data – Instead of frequent VSAM updates.
Monitor queues – Ensure TSQ or TDQ aren’t congested.
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.
Answer:
A CICS task is a single execution instance of a transaction.
Transaction Initiation – User enters a transaction ID.
Task Creation – CICS allocates storage.
Program Execution – Application program starts.
Resource Access – Files, DB2, TSQ, TDQ accessed.
Syncpoint Processing – Commit or rollback.
Task Termination – Resources released.
Interview Tip:
Mention short-lived tasks and efficient resource usage to improve throughput.
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
EXEC CICS SYNCPOINT
EXEC CICS SYNCPOINT ROLLBACK
Real-time Scenario:
If a DB2 update succeeds but VSAM update fails, a rollback ensures data consistency.
Answer:
ENQ/DEQ commands are used to explicitly lock resources.
ENQUEUE – Locks a resource
DEQUEUE – Releases the lock
Prevent simultaneous updates
Avoid data corruption
Example:
EXEC CICS ENQUEUE RESOURCE('CUSTREC')
Tip:
Improper ENQ usage causes deadlocks and performance issues.
| 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.
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.
Answer:
Occurs when a program accesses invalid memory.
Incorrect COMMAREA length
Pointer misuse
Array index overflow
Use HANDLE ABEND
Validate COMMAREA size
Analyze dump output
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.
| Type | Description |
|---|---|
| CICS Abend | Application-level failure |
| System Abend | OS or runtime failure |
AEY9 – DB2 error
AEI0 – Duplicate key
ASRA – Program exception
Answer:
ASRA occurs due to program logic errors.
Divide by zero
Invalid pointer
Data exception
Fix:
Check arithmetic logic
Validate input
Use compiler debug options
Answer:
MRO allows multiple CICS regions to communicate.
TOR – Terminal ownership
AOR – Application execution
FOR – File ownership
Advantage:
Improves scalability and performance.
Answer:
Multi-region setup
Automatic task recovery
Data integrity via syncpoints
Failover and restart mechanisms
Answer:
Used to schedule transactions for future execution.
EXEC CICS START
EXEC CICS DELAY
Scenario:
Batch reconciliation triggered after business hours.
Answer:
A reentrant program can be executed by multiple tasks simultaneously.
No self-modifying code
No static storage usage
Use working storage carefully
Why Important?
Reduces memory usage and improves scalability.
| Feature | Conversational | Pseudo |
|---|---|---|
| Task Duration | Long | Short |
| Resource Usage | High | Low |
| Scalability | Poor | Excellent |
Best Practice:
Always implement pseudo-conversational design.
Answer:
RACF integration
Transaction-level security
File and program authorization
User authentication
Answer:
Thread pooling allows reuse of DB2 threads.
Reduced CPU usage
Faster response times
Better scalability
Answer:
Check CEMT INQUIRE TASK
Analyze file contention
Review DB2 locks
Check TSQ/TDQ growth
Use CICS monitoring tools
Answer:
CICS supports REST and SOAP services.
JSON/XML processing
HTTP/HTTPS communication
Integration with modern apps
Answer:
Separate DEV/QA/PROD regions
Use CEDA/CSD definitions
Promote programs using change management tools
Q: Production transaction intermittently fails with AEY9 abend. How do you handle it?
Answer:
Check DB2 SQLCODE
Validate commit/rollback logic
Analyze thread usage
Review recent DB2 changes
Implement retry logic if needed
Answer:
EXEC CICS provides transaction control
COBOL I/O lacks recovery and concurrency support
EXEC CICS ensures ACID compliance
Answer:
Use syncpoints
Proper error handling
Rollback on failure
Consistent commit logic
Answer:
Prevents programs from accessing unauthorized memory areas.
Answer:
Suspend/resume tasks
Manage priorities
Prevent long-running tasks
Answer:
High reliability
Extremely fast transaction processing
Seamless integration with modern APIs
Proven scalability