Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

COBOL Module 15

Modern tooling, performance and safe change interview questions

Interview questions on modern tooling, performance and safe change: warm-ups, then what each harder question tests and how a good answer starts.

11 questions: 3 warm-ups and 8 with model answers · Levels: Fresher to staff

Warm-up questions

Short questions with short answers, each answered in full.

  1. Fresher to mid

    What does Git's working-tree-encoding attribute do for COBOL members kept in EBCDIC?

    Answered in the lesson Modern tooling: editors, Git, CI and Zowe

  2. Fresher to mid

    Why compare the CPU time of two builds of a COBOL program rather than their elapsed time?

    Answered in the lesson Performance: measuring and writing efficient COBOL

  3. Fresher to mid

    What does it mean to wrap a COBOL program, and when is that better than rewriting it?

    Answered in the lesson Modernising COBOL: wrappers, APIs and safe change

Questions with model answers

What each question tests, the first step of a good answer and the follow-ups to expect.

  1. Mid to senior

    Your CI job builds and tests every COBOL commit with GnuCOBOL, and it passed. The same change then fails in the z/OS test region with wrong totals. What can a GnuCOBOL pipeline not show, and what do you add so that the next difference is found before the test region?

    What it tests
    Knowing what a workstation build proves and what it cannot, dialect and data differences, and closing the gap with tests and a build on the target.
    First step
    List what differs between the two runs: the compiler and its options, the dialect, the data's encoding and number formats, and the input itself. Then reproduce the wrong total on the workstation with the region's input before changing any code.
    Follow-ups

    From the lesson Modern tooling: editors, Git, CI and Zowe

    Model answer, Pro. Model answers open with any pass; prices are in the notice on this page.

    Opening the model answers with your pass…

    Model answers open with any MySmartCoPilot pass.

    • Pro pass · 1 week₹79$2.99
    • 30 days₹179$5.99
    • 1 year₹1,699$45

    One payment; a pass never renews. The price shown is the total you pay: no fees or charges are added at checkout.

    It also opens every other in-depth part in Learn and every Pro tool. Sales are final, except where the law gives you a right to withdraw, for example in the EU and the UK (refund policy).

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  2. Fresher to senior

    A developer commits the project's Zowe configuration with a mainframe password in it, and the commit has been pushed. What do you do in the next hour, and what stops it from happening again?

    What it tests
    Responding to an exposed credential in the right order, and the controls that keep secrets out of repositories.
    First step
    Treat the password as known: have it revoked and replaced at once, before anything else, because every clone of the repository can already hold it. Then trace where it was used and remove it from the files and the history.
    Follow-ups

    From the lesson Modern tooling: editors, Git, CI and Zowe

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  3. Mid to senior

    A nightly COBOL step has grown from 25 to 40 minutes and now threatens the batch window. How do you find where the time goes before changing any code, and how do you prove that a fix is both faster and still correct?

    What it tests
    Measuring before changing, separating CPU from waiting, finding the hot spot, and proving a fix with golden output and repeated timings.
    First step
    Compare the CPU time and the elapsed time of the step from its job statistics: a step whose CPU grew is doing more work, one whose elapsed time grew alone is waiting. Then check whether the input grew, before suspecting the code.
    Follow-ups

    From the lesson Performance: measuring and writing efficient COBOL

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  4. Mid to senior

    A colleague proposes changing every COMP-3 field of a large batch program to COMP, because COMP was faster in a laptop test. What do you check before agreeing, on the laptop and on z/OS?

    What it tests
    Reading a benchmark's limits, IBM's guidance on numeric types, the effect of a USAGE change on files and records, and measuring on the target.
    First step
    Ask which fields are in record layouts, files and interfaces: changing their USAGE changes their bytes, so every program and file that shares them breaks. Then ask where the laptop result came from, because GnuCOBOL timings do not transfer to z/OS.
    Follow-ups

    From the lesson Performance: measuring and writing efficient COBOL

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  5. Mid to staff

    A batch reads 2 million transactions and, for each one, looks up its branch among 5,000 codes with a PERFORM loop over a PIC 9(4) subscript. Estimate the cost of the lookups, and choose between SEARCH, SEARCH ALL, sorting the transactions and a keyed file.

    What it tests
    Estimating from measured per-operation costs, the effect of the subscript's USAGE, binary search and its precondition, and choosing a design for the data's shape.
    First step
    Estimate from measured costs, not from big-O alone: time each kind of lookup on the real table, divide by the number of lookups and multiply by 2 million. Check first how the subscript is declared, because a PIC 9(4) item with no USAGE clause is DISPLAY.
    Follow-ups

    From the lesson Performance: measuring and writing efficient COBOL

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  6. Senior to staff

    Leadership wants a 30-year-old COBOL interest system rewritten in Java and switched over in one weekend. What do you propose instead, and how do you show progress and safety at every step?

    What it tests
    Weighing a one-step rewrite against incremental replacement, planning phases with exit criteria and a way back, and reporting progress with evidence.
    First step
    Name what the weekend plan cannot do: show that the new system gives the old system's answers before customers see them, or go back without losing work. Then propose recording today's results as golden outputs, the first step of any plan.
    Follow-ups

    From the lesson Modernising COBOL: wrappers, APIs and safe change

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  7. Mid to senior

    A mobile app must show the same monthly interest as the bank's statement, which a COBOL batch computes. How do you give the app that number so that the two can never disagree, and how do you prove it?

    What it tests
    Wrapping unchanged rules, interface design for a new caller, and proving that two channels give the same results.
    First step
    Keep one set of rules: call the same subprogram that the batch calls, through a wrapper that converts the app's request to its interface and its reply to JSON, instead of copying the rules into the app.
    Follow-ups

    From the lesson Modernising COBOL: wrappers, APIs and safe change

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  8. Senior to staff

    Side-by-side runs of an old COBOL batch and its replacement disagree on 0.3 % of accounts, each by one hundredth. How do you find the cause, decide which system is right, and decide when the replacement may answer customers?

    What it tests
    Diagnosing differences with exact values, treating the old system as the reference until a rule says otherwise, and exit criteria for a replacement.
    First step
    Take a few differing accounts and work their exact values out by hand: when the exact result lands on a half of the last unit, look first at how the new code holds and rounds numbers, since binary floating point cannot hold such values exactly.
    Follow-ups

    From the lesson Modernising COBOL: wrappers, APIs and safe change

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes

All COBOL interview questions · The COBOL track

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.