CICS interview questions and answers for mainframe developers
CICS interview questions check whether you can build and support online mainframe transactions: how a transaction ID starts a task that runs a program, why screens are written pseudo-conversationally with a COMMAREA or channel carrying state, how BMS maps send and receive data, how LINK, XCTL and RETURN differ, and what to do when a transaction abends with ASRA or AICA. Expect code-reading questions in COBOL and scenario questions from production support.
By Evin JohnPublished 7 min read
Where CICS questions come up
CICS is IBM's transaction server for the mainframe, behind teller screens, card authorizations, policy lookups and many APIs that look modern from the outside. Developer roles ask you to read and write COBOL programs with EXEC CICS commands; support and administration roles lean on abends, resource definitions and system commands. Nearly every CICS interview also checks the language underneath, covered in COBOL interview questions, and the database calls, covered in Db2 interview questions.
- ConceptsTransactions, tasks, quasi-reentrancy, pseudo-conversational design and why it matters for a shared region.
- Code readingA program skeleton with RECEIVE MAP, READ FILE and RETURN TRANSID. Find what breaks on the first entry, on PF3 or on an empty screen.
- Error handling and abendsRESP codes versus HANDLE CONDITION, and the first checks for ASRA, AICA, APCT or a Db2 connection abend.
- Design and operationsPassing large data, queues, recovery, new program versions, and how work is routed across regions.
CICS fundamentals questions
| Question | What it tests | What a strong answer shows |
|---|---|---|
| What is CICS? | Purpose | A transaction manager that runs many short online units of work at once for many users, handling terminals or web requests, task dispatching, storage, file and database access, security and recovery for the application. |
| Transaction, task and program: how are they related? | Core model | A transaction ID (up to four characters) is defined to start a particular program. Each time it is invoked, CICS creates a task, one running instance, which can link to further programs. |
| What does quasi-reentrant mean? | Program rules | Many tasks share one copy of the program, so the program must not modify itself. Each task gets its own copy of working storage, and CICS switches tasks only at CICS commands. |
| Conversational or pseudo-conversational? | Design | A conversational program waits for the user while holding its resources. A pseudo-conversational one sends the screen, ends the task with RETURN TRANSID, and starts a new task when the user presses a key, which frees storage and locks during think time. |
| What is the COMMAREA? | State | An area passed on RETURN TRANSID, LINK or XCTL that carries state to the next task or program. It is limited to about 32 KB, which is why larger data uses channels. |
| How do you know if it is the first time into a transaction? | EIB | Check EIBCALEN. Zero means no COMMAREA was passed, so this is the first entry: send the initial screen. A non-zero length means you are returning with saved state. |
| What is the EIB? | Context | The Exec Interface Block, filled by CICS for each task: transaction ID, terminal, the attention key pressed (EIBAID), COMMAREA length, and response codes of the last command. |
| What is BMS? | Screens | Basic Mapping Support. Mapsets are coded with macros (DFHMSD, DFHMDI, DFHMDF), assembled into a physical map (screen layout) and a symbolic map (a copybook with the fields the program uses). |
| What is the MDT? | Screen data | The modified data tag on a field. Only fields with it set are sent back on RECEIVE MAP, so a field the user did not touch arrives empty unless the program set the tag (FSET) when sending. |
| Which CICS-supplied transactions do developers use? | Tools | CEDF to step through commands in a program, CECI to try a command interactively, CEBR to browse temporary storage queues, CEMT to inquire on and change resources, and CEDA to define them. |
Pseudo-conversational code questions
WORKING-STORAGE SECTION.
01 WS-RESP PIC S9(8) COMP.
01 WS-COMMAREA.
05 CA-CUST-ID PIC X(8).
LINKAGE SECTION.
01 DFHCOMMAREA PIC X(8).
PROCEDURE DIVISION.
IF EIBCALEN = 0
MOVE SPACES TO WS-COMMAREA
PERFORM SEND-FRESH-MAP
ELSE
MOVE DFHCOMMAREA TO WS-COMMAREA
IF EIBAID = DFHPF3
EXEC CICS RETURN END-EXEC
END-IF
PERFORM PROCESS-INPUT
END-IF
EXEC CICS RETURN TRANSID('CUSQ')
COMMAREA(WS-COMMAREA)
END-EXEC.
PROCESS-INPUT.
EXEC CICS RECEIVE MAP('CUSMAP') MAPSET('CUSSET')
INTO(CUSMAPI) RESP(WS-RESP)
END-EXEC
EVALUATE WS-RESP
WHEN DFHRESP(NORMAL)
PERFORM READ-CUSTOMER
WHEN DFHRESP(MAPFAIL)
PERFORM SEND-FRESH-MAP
WHEN OTHER
PERFORM SEND-ERROR-MESSAGE
END-EVALUATE.
READ-CUSTOMER.
EXEC CICS READ FILE('CUSTFILE') INTO(CUST-RECORD)
RIDFLD(CUSTIDI) RESP(WS-RESP)
END-EXEC
IF WS-RESP = DFHRESP(NOTFND)
MOVE 'CUSTOMER NOT FOUND' TO MSGO
END-IF.- What happens if the program forgets RETURN TRANSID on one path? The next key the user presses has no transaction to start, so the screen stops responding or the user gets an unknown transaction message. Every path through the program has to end the same way.
- When does MAPFAIL occur? When RECEIVE MAP finds no data, typically the user pressed Enter or Clear without changing any field. Treat it as "show the screen again", not as an error.
- How do you know which key the user pressed? Compare EIBAID with constants from the DFHAID copybook, such as DFHENTER, DFHPF3 or DFHCLEAR. HANDLE AID does the same in older code.
- How do you position the cursor on a field with an error? Move -1 to that field's length in the symbolic map and send with the CURSOR option, or give an explicit position.
- What do MAPONLY and DATAONLY do? MAPONLY sends the layout and constants without program data; DATAONLY sends only the variable fields, saving bytes when the layout is already on screen.
- Why move DFHCOMMAREA into working storage first? The incoming area belongs to CICS and has the length the previous task passed. Copying it keeps the program working on its own storage and makes the layout explicit.
Intermediate: program control, queues and data
| Question | What it tests | What a strong answer shows |
|---|---|---|
| LINK versus XCTL? | Program control | LINK calls another program and expects control back, like a subroutine at a lower logical level. XCTL transfers control at the same level without coming back, freeing the caller's storage. |
| What does START do? | Async work | Starts another transaction as a separate task, now or after an interval, optionally passing data. It is used for printing, background work and fire-and-forget processing. |
| Temporary storage or transient data queues? | Queues | A TS queue is a scratchpad addressed by item number that can be read many times and rewritten, in main or auxiliary storage. A TD queue is read once in order; intrapartition queues can trigger a transaction at a set depth, extrapartition ones map to sequential datasets. |
| How do you pass more than 32 KB between programs? | Channels | Use a channel with named containers. Each container holds a block of data of any practical size, and programs pass the channel on LINK, XCTL, START or RETURN. |
| How do you read many records from a VSAM file? | File browse | STARTBR to position, READNEXT or READPREV in a loop, and ENDBR when done. Forgetting ENDBR holds resources until the task ends. |
| What does READ UPDATE do? | Locking | Reads the record and holds it for this task until REWRITE, DELETE, UNLOCK or the end of the unit of work. Holding it across a screen send in pseudo-conversational code is impossible by design. |
| How do you serialize access to a shared resource that is not a file? | ENQ/DEQ | EXEC CICS ENQ on a resource name, do the work, then DEQ. Keep the window short and in a consistent order across programs to avoid deadlocks. |
| How do you pick up a new version of a program? | Operations | After the load module is replaced, tell CICS to load the new copy with a CEMT SET PROGRAM NEWCOPY or PHASEIN. NEWCOPY fails if tasks are still using the program; PHASEIN lets running tasks finish on the old copy. |
Senior: errors, abends, recovery and scale
- RESP or HANDLE CONDITION? RESP (with RESP2) returns the condition into a field you test right after the command, which keeps the logic local and readable. HANDLE CONDITION sets up jumps to labels that stay active, which makes flow hard to follow. Most shops standardize on RESP for new code.
- What does ASRA mean and how do you investigate? A program check inside CICS, often a data exception (the S0C7 of batch) or a protection exception. Find the offset in the transaction dump or a debugging tool, map it to the statement through the compile listing, and look at the data in the fields involved.
- What is AICA? The task ran too long without giving control back to CICS, usually a loop that issues no CICS commands. CICS stops it so it does not starve the region. Look for loops with a wrong exit condition.
- What is APCT? CICS could not find or load the program for the transaction: a missing definition, a load library problem or a disabled program.
- A transaction abends AEY9 after a Db2 maintenance window. What do you check? That code is commonly reported when the connection between CICS and Db2 is not active. Check the Db2 connection status in the region and whether the subsystem is up before changing any program.
- How does CICS keep data consistent if a task fails halfway? Changes to recoverable resources (defined files, Db2, recoverable queues) form a unit of work. SYNCPOINT commits it, SYNCPOINT ROLLBACK or an abend backs it out. Non-recoverable resources are not backed out, which is a design question in its own right.
- What does threadsafe mean in CICS? A program that can run safely on an open TCB alongside other tasks, which avoids switching back to the single quasi-reentrant TCB around Db2 or other calls. It requires that shared storage is serialized properly, so the program must be reviewed before it is marked threadsafe.
- What are MRO and function shipping? Multi-region operation connects regions in the same system, often split into terminal-owning, application-owning and file-owning roles. Function shipping sends a file or queue request to the region that owns it; distributed program link runs a program in another region.
- How do online programs serve web or API clients? Programs can be exposed as web services or JSON-based APIs through CICS facilities and related products, often by wrapping an existing COMMAREA program. Interviewers want to hear that the business logic stays where it is and the interface layer is added around it.
Fictional example
- Interviewer
- Tellers report that the customer inquiry screen occasionally shows data from the last customer they looked up. What would you look at?
- Candidate
- I would first get a pattern: which keys they press and whether it happens after a not-found. My suspicion would be the not-found path. If READ returns NOTFND, the program might move a message but not clear the output fields in the symbolic map, and since it sends with DATAONLY, old values on screen stay where they are. I would reproduce it in a test region with CEDF, stepping through a lookup of a valid customer and then an invalid one. The fix is to clear the output map area before every send and to blank out fields on the not-found path. I would also check that nothing customer-related is kept in the COMMAREA after a failed lookup.
How to prepare for a CICS interview
- Days 1 and 2: write out the pseudo-conversational skeleton from memory, including EIBCALEN, EIBAID, MAPFAIL and RETURN TRANSID, and explain each line.
- Day 3: list LINK, XCTL, RETURN and START with one real use for each, then TS versus TD queues and COMMAREA versus channels.
- Day 4: prepare abend answers for ASRA, AICA and APCT, plus the Db2 connection case, each with a first check and a likely cause.
- Day 5: walk through a VSAM browse and a READ UPDATE, and what happens on a duplicate key or record not found.
- Days 6 and 7: rehearse one production incident and one enhancement you made, and be ready to describe your shop's region setup in general terms.
Mainframe interviews often run as a long conversation with one senior developer, and it is easy to lose track of which follow-up you dodged. Natively, an AI interview assistant for Mac and Windows, transcribes your mock CICS round on your computer, so you can read back where your answer on recovery went vague. In practice it can read a program listing or an abend screen from a screenshot and suggest what to check, and with Pro or the free trial it uses your résumé and the job description you add. Your transcripts and notes stay saved.
Questions people ask
What CICS questions are asked in interviews?
Transactions versus tasks, pseudo-conversational design, EIBCALEN and the COMMAREA, BMS maps and MAPFAIL, LINK versus XCTL, temporary storage versus transient data queues, RESP checking, and abends such as ASRA and AICA.
What is pseudo-conversational programming in CICS?
The program sends a screen and ends its task with RETURN TRANSID, passing state in a COMMAREA or channel. When the user responds, a new task starts and reads that state, so no resources are held while the user thinks.
What is the difference between LINK and XCTL?
LINK calls another program and gets control back afterwards. XCTL passes control to another program at the same level and does not return to the caller.
What does the ASRA abend mean?
A program check inside a CICS task, often a data exception from invalid numeric data or a storage protection exception. Use the dump offset and the compile listing to find the failing statement.
Where to go next
Practice with the same assistant you would use on a call: it listens, transcribes and suggests answers from your own resume and the job description.
Facts on this page were last checked on . Product details come from the Natively app itself; if something here is out of date, tell us at hello@heynatively.com.
