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.
Warm-up questions
Short questions with short answers, each answered in full.
-
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
-
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
-
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.
-
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
-
- Which compiler options would you match between the two builds?
- How do you get test data from the region without copying customer data?
- Where in the pipeline does a build on z/OS belong?
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.
Passes can’t be bought right now, so the model answers can’t be opened at the moment. If you have a pass, enter your licence key.
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
-
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
-
- Why is a new commit that deletes the password not enough?
- Where should the CI job get its mainframe credentials from?
- Which check would have stopped the commit?
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
-
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
-
- The CPU time grew by the same 60 % as the input. Is anything wrong?
- How do you find the paragraph that uses the time?
- What do you record so that the next person can repeat your measurement?
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
-
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
-
- Which fields could change without touching any file or interface?
- What does IBM say about binary and packed decimal for items of more than eight digits?
- How would you measure the change on z/OS?
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
-
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
-
- What must be true of the table for SEARCH ALL?
- When would sorting the transactions by branch beat any table lookup?
- When is a keyed file the better place for the codes?
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
-
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
-
- How do you measure progress if nothing is switched for months?
- What exit criteria would you set for the first slice?
- What does the incremental plan cost that the weekend plan does not?
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
-
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
-
- What belongs in the wrapper, and what must stay out of it?
- How does the reply report an account that earns no interest?
- Which test proves that the app and the statement agree?
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
-
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
-
- What if the old system turns out to be the one that is wrong?
- How do you make sure the fix covers every affected account, not just the ones you looked at?
- What exit criterion would you set before the replacement answers customers?
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