Interview lab: design, troubleshoot and code
Plain-English notes, safe code skeletons, IBM i commands, and a checkpoint you can use before opening the deeper question bank.
- Structure an answer around constraints, trade-offs, and evidence.
- Spot hidden failure windows in common IBM i designs.
- Practice code-first explanations in both fixed and free RPG.
Learning notes
Use a repeatable answer frame
For a design question, state the business goal and constraints first. Then name the object or service you would use, show the data and job flow, and explain authority, commitment, monitoring, and recovery. End with one trade-off and one test that would change your decision.
For a troubleshooting question, state the symptom you would measure, the first log or command you would inspect, and the safe mitigation. Interviewers are looking for a controlled investigation, not a list of commands.
- Clarify the goal and constraints
- Choose the smallest IBM i design that fits
- Name failure, authority, and consistency behavior
- Describe observability and recovery
- Give a test and a measured trade-off
Find the hidden failure window
Tricky questions often hide an assumption: a library list is stable, a queue entry is processed once, a record is unlocked, a service program interface never changes, or a batch job can simply be rerun. Challenge the assumption and offer a safer design with an operator path.
When a requirement is ambiguous, state what you would ask before coding. A short clarifying question can prevent a technically correct answer from solving the wrong problem.
A compact investigation checklist
DSPJOB JOB(*) OPTION(*JOBLOG) DSPLIBL DSPOBJAUT OBJ(APPDATA/*ALL) OBJTYPE(*ALL) WRKACTJOB SBS(*ALL) DSPJOBQ JOBQ(APPDATA/BATCHQ)
Explain code in both RPG styles
The fixed and fully free examples should express the same business behavior. In an interview, describe the input, lookup, status check, update, and test cases before showing source. Mention what you would add in production: prototypes, error handling, commitment scope, logging, and a concurrency decision.
Keep the code skeleton intentionally small. The goal is to show safe control flow and the questions you would resolve with the team, not to pretend a five-line snippet is a complete application.
Safe update skeleton
Fixed format
FProducts UF E K DISK C productId CHAIN ProductRec C IF %FOUND(Products) AND newQty >= 0 C EVAL quantity = newQty C UPDATE ProductRec C ENDIF
Fully free
**FREE dcl-f Products keyed usage(*update); chain productId ProductRec; if %found(Products) and newQty >= 0; quantity = newQty; update ProductRec; endif;
Open the detailed question chapters
- Real-world design scenarios · 6 questions
- Production troubleshooting drills · 6 questions
- Tricky questions & common myths · 6 questions
- Common IBM i issues & fixes · 24 questions
- Coding lab: RPGLE and CL from fixed to free form · 44 questions
Practice checkpoint
Answer all five, then review the explanations. The interactive site stores your completed learning checkpoints in this browser.
- 1. Who should commit an order that changes stock and accounts?
- Each low-level update independently
- The printer program
- The queue consumer before validation
- The coordinator of the complete order unit
- 2. What makes a large import restartable?
- Durable run identity and coherent checkpoints
- Only a progress percentage on screen
- Only QTEMP staging
- Only a large buffer
- 3. What avoids overwriting a clerk’s intervening change?
- An unconditional update from the stale screen
- Conditional update using a version token
- Only a longer timeout
- Only a different terminal
- 4. What should a payment queue entry reference?
- Only an untracked amount
- Only the terminal number
- A durable request with a unique operation key
- Only the current time
- 5. Before exposing a screen program as an API, remove:
- All validation
- All authorization
- All error reporting
- Interactive and hidden per-session assumptions
Show answer key and explanations
1. D — The coordinator of the complete order unit The complete invariant must hold before the unit commits.
2. A — Durable run identity and coherent checkpoints A new job must be able to identify completed and remaining business work.
3. B — Conditional update using a version token Optimistic conflict detection protects changes made after the initial read.
4. C — A durable request with a unique operation key A durable request supports deduplication and crash recovery.
5. D — Interactive and hidden per-session assumptions Server requests need explicit contracts and predictable state lifetimes.
IBM documentation for this path
- IBM: Using COMMIT
- IBM: Isolation level
- IBM: Create Data Queue
- IBM: Integrated web services articles
- IBM: Work management (7.5)
- IBM Docs: RPG file operations
- IBM: Service program signature
- IBM: RPG record locking
- IBM: Commitment definitions and activation groups
- IBM Docs: Monitor Message (MONMSG)
- IBM Docs: Embedded SQL programming
- IBM: Object and library authority
- IBM Docs: RPG IV Reference
- IBM Docs: RPG built-in functions
- IBM Docs: RPG procedures and prototypes
- IBM Docs: CL programming
- IBM Docs: Submit Job (SBMJOB)
- IBM Docs: Override with Database File (OVRDBF)
- IBM Docs: Data queues