COBOL Programmer (Common Business Oriented Language Programmer) Interview Questions
For mainframe and COBOL programmers. These questions focus on batch failures, job performance and checking the records a batch program produces.
30 questions, ranked by what the job needs most
Print the top 10:Scoring sheetPractice sheet
Question 1: Share an example of how you traced a mainframe batch program's abnormal end to an error in its code.
Example answerThe interviewer wants to understand how you use batch diagnostics to find and correct a mainframe program error.
Use Situation, Task, Action, Result. Set out the failed job, your responsibility and the evidence you followed. Explain the correction and the checks that made a rerun appropriate.
An example: "A nightly batch program ended abnormally while converting an incoming amount field. I checked the job output and diagnostic details, then traced the failing record to a code path that assumed the field contained digits. A blank value reached that conversion without validation. I changed the program to handle that input according to the file rules and tested valid, blank and invalid amounts. Before the rerun, I checked whether the failed run had written any output. The rerun completed, and I reconciled the processed and rejected records with the input."
Avoid restarting repeatedly without investigation, changing data just to hide the failure, or treating successful completion as the only output check.
Interviewer tipListen for job output or diagnostic evidence, the faulty code and a checked rerun. Repeatedly restarting the batch without understanding the failure is a red flag.
Candidate tipDescribe the failed batch run and the evidence you followed. Explain your code correction, how you reran the job safely and what confirmed the intended output.
Question 2: Describe a program you wrote to automate a task people had been doing by hand.
Interviewer tipListen for a clear link between the manual task and the code they wrote. A description of the programming language alone leaves it unclear whether the program did the job.
Candidate tipA class project is fine. Explain what the manual task involved, what went into your program, and what it produced for the person doing the work.
Question 3: Walk me through a change you made to a mainframe batch program that was taking too long to finish.
Example answerThe interviewer wants to know whether you can locate a batch bottleneck and improve performance while preserving the required results.
Use Situation, Task, Action, Result. Describe the job's workload, the slow part and your own program change. Compare runs with similar inputs and explain how you checked the output.
An example: "A batch report was running late as its input file grew. I reviewed the job's timing and file activity and found that the program repeatedly searched the same reference file. I changed the lookup logic to keep the needed reference values available during processing. I tested the change against a representative input copy and compared the output records and totals with the original program. The changed version completed sooner in those runs and produced the same expected report. I recorded the test conditions before the change moved forward."
Avoid claiming a speedup from unlike runs, skipping required processing, or leaving correctness checks to someone else without explaining the handoff.
Interviewer tipExpect evidence of the slow step, a justified program change and a comparison of run time and output. Skipping required records to meet the batch window is a red flag.
Candidate tipName the bottleneck and your role in changing the batch code. Compare runs with similar inputs and explain how you checked both completion time and output.
Question 4: Tell me how you worked with an operations teammate or systems analyst to get a program running again after a scheduled run failed.
Interviewer tipListen for what each person contributed and how they confirmed that the next run worked. A red flag is calling the problem fixed without checking the new run.
Candidate tipBriefly describe the failed run, then say what your teammate saw in the run log and what you checked in the code. Finish with how you confirmed together that the program was working again.
Question 5: How would you test a changed COBOL batch program before letting it process the full production input?
Example answerThe interviewer wants to see a test plan that establishes whether a changed COBOL batch program produces correct records.
Organize the answer around the changed logic, representative input, expected output and checks before production use. Include invalid or empty input where it affects the program.
An example: "I would identify the changed rules and create a small input file with expected output records and totals. I would include normal records, boundary amounts and records the program should reject. I would run the changed program in a test environment, compare its output with the expected results and investigate differences. For unchanged behavior, I would also compare it with the prior version on the same input. I would review the job output and return status, then record the test results before requesting production processing."
Avoid relying only on a clean return code, testing only ordinary records, or using production input without understanding possible writes and rerun effects.
Interviewer tipThe plan should cover representative input, boundary cases and checks on output records and totals. A clean return code alone does not prove the batch results are correct.
Candidate tipWalk through the test data and expected outputs, including empty or invalid input. Explain how you would compare the results before the program processes production records.
Question 6: Walk me through a time you documented a program change so another programmer could pick up where you left off.
Interviewer tipGood handoff notes help a teammate understand why the code changed and how to check it. A list of files with no explanation of the change leaves the next programmer guessing.
Candidate tipChoose a real change and describe what you wrote about why it was made and how to test it. Mention any teammate feedback that showed what was clear or what could use more detail.
Question 7: Describe a time you weighed two ways to store data that a program needed to look up later.
Interviewer tipListen for a strength and a drawback of each option given the program's needs. Claiming one way to store data is always faster without considering the kind of lookup is a red flag.
Candidate tipName both approaches and the trade-off that mattered for those lookups, such as search speed or how often the data changed. Say how the comparison shaped your choice and what happened when you used it.
Question 8: Share an effective method you have used to ensure that networks, workstations, central processing units, and peripheral equipment respond to programs' instructions.
Question 9: Walk me through how you prioritize when bug fixes, change requests and new programming work all land on you at once.
Example answerThe interviewer wants to see how you decide what to work on when everything seems urgent, and whether you keep others informed. Explain your general method, then back it up with a recent example. Sample answer: "I sort work by impact and deadline. A bug that stops users from working comes first, then work with a fixed date, then smaller changes. When two requests compete and I'm not sure which matters more, I ask my lead rather than guess. Recently I was midway through a new feature when a bug stopped orders from saving. I paused the feature, fixed and tested the bug the same day, then told my lead the feature would be a day late and asked whether a small change request could wait until the following week. They agreed, and everything shipped in that order." Pitfalls to avoid: saying you just work harder or longer; treating every request as top priority; leaving your manager out when plans change.
Interviewer tipA strong answer weighs impact and urgency and checks priorities with the lead or manager. Working tickets strictly in arrival order, or never pushing back, is a red flag.
Candidate tipExplain the method you use, such as ranking by impact on users and by deadline, and give a recent example. Mention how you keep your lead informed when priorities change.
Question 10: Share an example of how you made sure a change to a shared data field was consistent everywhere the application used it.
Interviewer tipListen for how they tracked down uses of the field and checked that the change reached them. Assuming reports were unaffected without checking whether they used the field is a red flag.
Candidate tipPick one field you changed. Explain how you found where it was used, such as on a form or in a report, and what your checks showed.
Question 11: Walk me through the programming work you've done on your most recent projects.
Interviewer tipListen for a specific piece of code and its purpose on each project. A list of languages and project names leaves their programming work unclear.
Candidate tipPick two recent projects. For each, name the part of the application or script you worked on, the code you wrote or changed, and what it did when it ran.
Question 12: Give an example of how you coded a decision in a program from a workflow diagram.
Interviewer tipA strong answer traces a decision on the diagram to a condition in the code and explains where each path leads. Coding only the usual path leaves other cases in the diagram unhandled.
Candidate tipPoint to a decision on the diagram, such as whether to send an order for review. Name the condition you coded and show how the program followed the paths in the diagram.
Question 13: Tell me about a time a conversation with a teammate helped you pin down why a program was giving the wrong result.
Interviewer tipListen for a clue the teammate supplied about the expected output or the code and how the candidate used it. Forwarding a bug report without discussing the problem gives no evidence of a joint diagnosis.
Candidate tipDescribe the wrong result, what you brought to the conversation, and the clue your teammate added. End with what you were able to pin down or fix because of that input.
Question 14: Tell me how you used code, documents and conversations to find the information that mattered for a programming change.
Example answerThe interviewer wants to see how you choose useful information from several sources before changing a program.
Use Situation, Task, Action, Result. Set up the programming change and the information gap. Name the sources you consulted, explain which details mattered to the requirements, and end with the effect on your code or tests.
Sample answer: "A spec asked me to add a late fee to overdue invoices but did not explain partial payments. I checked the billing code, the policy document and the business analyst's explanation. I set aside code for closed accounts because this change covered open invoices. The remaining sources still left a gap, so I sent the analyst examples of the different fee outcomes. The analyst confirmed the intended rule, and I used those examples in the tests."
Avoid listing sources without explaining their relevance, treating old code as the final authority, or guessing when the requirement remains unclear.
Interviewer tipA strong example compares sources and explains which details mattered to the programming change. Gathering documents without judging their relevance is a weak answer.
Candidate tipUse a real programming change. Name the sources you consulted, explain which details mattered to the requirements, and show how your choices shaped the code or tests.
Question 15: Share an example of a test you ran that helped you make a program more reliable.
Interviewer tipListen for a test that exposed a specific failure and a rerun that showed the fix worked. Disabling the failing test without fixing the problem is a red flag.
Candidate tipName the input or condition that exposed the failure, the fix you made, and the result when you ran that case again. If you kept the test to catch the same failure later, say so.
Question 16: Tell me about a time you applied a new programming tool, technology or technical information to improve your team's work.
Example answerThe interviewer wants to learn how you applied new technology or information to produce a useful change in programming work.
Use Situation, Task, Action, Result. Describe the team's need, the new tool or information and your role in applying it. Explain the checks you made and the benefit you could actually observe.
An illustrative example: "Our team maintained a reporting program, and I applied a new testing approach when adding an export. I started with a small part of the code, built checks for date handling and compared the generated files with known examples. I asked another developer to review the tests before we used them for later changes. A test caught an end-of-month date error before release. I corrected the export and added the case to our regular checks, so the team could catch the same error when changing that code again."
Avoid listing technologies without an application, claiming a tool was better simply because it was new, or inventing time savings. State any limits in how you measured the benefit.
Interviewer tipListen for a concrete application in code or a programming workflow and evidence of its benefit. Claiming improvement simply because the technology was new is a red flag.
Candidate tipName the new tool or information and the programming problem it addressed. Focus on how you applied it, checked the work and assessed the benefit to your team.
Question 17: Give an example of how you turned the branches in a workflow diagram you drew into code.
Interviewer tipListen for a clear link between a decision in the diagram and the paths the code can take. Leaving out a branch the workflow calls for is a red flag.
Candidate tipPick one decision in the diagram and describe how you coded and checked each path from it. A course project or capstone works if you drew the diagram and wrote the code.
Question 18: Tell me about a time you spotted a problem in a program's output, logs or error reports before users did.
Interviewer tipListen for what they were watching, what made them notice, and how they confirmed and fixed the issue. Ignoring warnings until users complained is a red flag.
Candidate tipExplain what you were reviewing and what looked wrong. Describe how you checked the cause, what you did about it, and whether you added anything to catch it sooner next time.
Question 19: Describe your approach when a program you write has to process a very large volume of records.
Interviewer tipA strong answer covers testing with realistic data volumes, efficient queries or batching, and checks that no records were lost. Never having considered speed or data volume is a red flag.
Candidate tipUse a real example. Explain how you handled memory, speed and errors, how you tested with realistic data, and how you confirmed the output was complete and correct.
Question 20: Tell me about a time you had to tell a manager or client that a program would miss its deadline or had a serious bug.
Example answerThe interviewer wants to know whether you raise bad news early and honestly, and whether you bring options along with the problem. Use Situation, Task, Action, Result. Sample answer: "Two weeks before a release, I found that the data conversion I was writing would take much longer than planned, because the old records had far more errors than expected. I told my manager that day rather than hoping to catch up. I explained what I had found, showed a few examples of the bad records, and offered two options: move the date, or release with the clean records converted and fix the rest in a second pass. My manager chose the second option and explained the plan to the client. The release went out on time, and the second pass finished a few weeks later." Pitfalls to avoid: waiting until the deadline to speak up; blaming teammates or the client; bringing the problem with no ideas for what to do next.
Interviewer tipLook for early, honest notice with the facts, the impact and some options. Hiding the problem until the deadline, or blaming teammates, is a red flag.
Candidate tipSay what the news was, when and how you raised it, and what options you offered, such as a smaller scope or a fix plan. End with how the people involved responded.
Question 21: Tell me about a time you worked with a teammate who was hard to deal with, such as during code reviews or on a shared program.
Example answerThe interviewer wants to know whether you can work professionally with a difficult teammate while keeping programming work moving.
Use Situation, Task, Action, Result. Describe the behavior and its effect on the code review or shared program. Focus on your own actions, then explain the outcome and anything you would change.
Sample answer: "A teammate rejected my changes in code reviews with short comments that did not explain the problem. I asked for a conversation about a specific review. They were worried that the new code would be hard to test. I added testing notes to my changes, and we agreed that review comments should name the concern and explain the requested change. Our next review focused on test coverage rather than personal criticism. I learned to ask about a concern before assuming what a comment meant."
Avoid attacking the person's character, claiming you were entirely right, or hiding information to undermine them. Involving a lead can be appropriate when a conflict remains unresolved.
Interviewer tipListen for specific steps to resolve the code-review conflict and keep work moving. Personal attacks or hiding information to undermine the teammate are red flags; involving a lead can be appropriate.
Candidate tipDescribe the behavior, not the person's character. Explain what you did to keep the work moving, such as talking one on one or agreeing on review rules, and how the working relationship ended up.
Question 22: Describe an effective method you have used to maintain and control the use of computer systems software.
Question 23: Share an experience in which your contribution to the development of instructions for end users benefited your company.
Question 24: Describe a time when looking more closely at users' needs changed how you planned to build a feature.
Interviewer tipA strong answer connects a specific user need to a change in the feature design. Watch for a candidate who treats a guess about what users need as a confirmed requirement.
Candidate tipStart with the requirement you were given and the user need it left unclear. Explain the design choice you made once you understood that need and what the change let users do.
Question 25: Provide a time when you were able to identify a complex problem, evaluate the options, and implement a solution. How did the solution benefit your employer?
Example answerThe interviewer wants to see how you handle problems with many parts: how you break them down, choose a path, and follow through.
Use Situation, Task, Action, Result. Explain why the problem was complex, such as several causes or many people affected. Walk through how you found the root cause, the options you weighed, and how you put the solution in place. End with the benefit to your employer.
Sample answer: "Our monthly billing kept going out late. The cause wasn't one thing: data arrived late from two departments, and the billing software needed manual fixes. I mapped each step, timed them, and found the manual fixes took the most time. I compared hiring temporary help with automating the fixes, and we chose automation with help from our technology team. Billing went out on time for the next three months, and customers paid faster."
Pitfalls: Don't pick a simple problem and call it complex. Avoid skipping the options you considered. Don't take credit for others' work; name who helped.
Question 26: Share an experience in which your ability to consider the costs or benefits of a potential action helped you choose the most appropriate action.
Example answerThe interviewer wants to see that you think through the trade-offs of a decision before acting.
Use Situation, Task, Action, Result. Describe the decision, the options, and the costs and benefits you weighed, including money, time, risk, and the effect on people. Explain which you chose and how it turned out.
Sample answer: "Our team's printer broke for the third time in a year. One option was another repair, which was cheap. Another was a new printer, which cost more up front. I looked at the past year's repair bills and the downtime each breakdown caused. The repairs plus lost time were likely to cost more than a new machine over two years. I shared that with my manager, we bought a new printer, and we haven't had a breakdown since."
Pitfalls: Don't focus only on money; include time and people. Avoid a decision you made without checking the facts. Don't skip how it turned out.
Question 27: Tell me about a time you found an unusual approach to a programming problem that the obvious solution couldn't handle.
Interviewer tipListen for why the usual solution failed and how they tested the alternative. Needless complexity without explanation, documentation or a plan for maintenance is a red flag.
Candidate tipDescribe the problem and why the standard approach didn't fit. Explain your idea, how you tested it, and what it meant for the program or its users.
Question 28: Provide an example of a time when you were able to demonstrate excellent listening skills. What was the situation and outcome?
Example answerThe interviewer wants evidence that you listen to understand, not just to reply, and that it makes a difference to your work.
Use Situation, Task, Action, Result. Show what careful listening looked like: letting the person finish, asking follow-up questions, and repeating back what you heard. The outcome should show that listening caught something you would otherwise have missed.
Sample answer: "A manager from another department asked for a monthly report and said they wanted it faster. Instead of starting right away, I asked what they used the report for. They mentioned twice that they only looked at two of the columns. I confirmed that with them, built a one-page summary of just those figures, and it took a third of the time to produce. They used the summary format from then on."
Pitfalls: Don't just describe yourself as a good listener without an example. Avoid an answer where you talk mostly about what you said. Don't leave out the outcome the question asks for.
Question 29: Share an experience in which your understanding of a current or upcoming problem helped your company to respond to the problem.
Example answerThe interviewer wants to see that you keep up with what is happening around your work and use that knowledge to help the organization prepare.
Use Situation, Task, Action, Result. Explain what the problem was, how you came to understand it early (reading, training, talking with others), what you recommended, and how the organization responded.
Sample answer: "I read in an industry newsletter that a key supplier planned to stop making a part we used in several products. I checked with our purchasing team, confirmed the news, and researched two replacement parts. I shared a short summary with my manager, and we ordered extra stock of the old part while we tested a replacement. When the supplier stopped production months later, we switched over without any delays to customers."
Pitfalls: Don't take credit for spotting something everyone already knew. Avoid a story where you noticed the problem but did nothing. Don't leave out how you learned about it.
Question 30: Provide a time when you worked in a rapidly evolving workplace. How did you deal with the change?
Example answerThe interviewer wants to know how you respond when processes, tools, or priorities change quickly, and whether you help or slow things down.
Use Situation, Task, Action, Result. Describe what was changing and how it affected your work. Then explain what you did to adjust: learning the new way, asking questions, or helping others through it. End with how things turned out and what you took from it.
Sample answer: "In one year my team changed its scheduling software, its reporting process, and its manager. When the new software came in, I signed up for the first training session, wrote a one-page guide for the steps we used most, and shared it with the team. Questions to our manager dropped within a couple of weeks, and I was asked to help test the next update."
Pitfalls: Don't complain about the changes or past leadership. Avoid saying you just went along with it; show what you actively did. Don't pick a change so small it doesn't show adaptability.
Interviewer tipMake sure the candidate is flexible.
Candidate tipShow that you can adapt.
New to interviews? Start with the common questions every interview asks →