Error Handling
- Status checking culture. COBOL error handling is checking: file status, SQLCODE, response codes after every operation.
- ON SIZE ERROR. Arithmetic guards with ON SIZE ERROR: overflow caught at the statement, not discovered in ledgers.
- Abend versus continue. Batch decides per error: abend the job or log and continue: policy written, not improvised.
Mainframe Debugging
- Displays and traces. DISPLAY statements trace batch runs: the humble printf of the mainframe, read in job output.
- Abend codes. An abend code names the failure class: S0C7 is bad numeric data, the classic to recognise on sight.
- Dumps. A dump shows storage at failure: the record that contained the letter in the amount field.
Production Failure Investigation
- Reproduce with data. Mainframe bugs reproduce with the failing record: extract it, isolate it, replay it in test.
- Data archaeology. Most failures are data: a layout drifted, a code unmapped, a file out of order.
- Fix forward carefully. Production fixes rerun within windows: reconciliation proving the correction complete.
Before and after this level
- Before: Level 9: Online Transactions: CICS Concepts, Transaction Programs, Enterprise Mainframe Workflows.
- Next: Level 11: Modernisation & Interoperability: APIs Around COBOL, Integrating With Modern Systems, Incremental Modernisation.
In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.
Frequently asked questions
What does COBOL Level 10: Errors & Debugging cover?
Error Handling, Mainframe Debugging, Production Failure Investigation: 3 lessons and 9 ideas.
What should I know before this level?
The level before it, Level 9: Online Transactions, which covers CICS Concepts, Transaction Programs, Enterprise Mainframe Workflows.