COBOL course

COBOL Level 8: Databases

Databases is level 8 of 12 of the LoWisa COBOL course. It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

Updated 2026-11-25

Embedded SQL

  • EXEC SQL. COBOL embeds SQL between EXEC SQL and END-EXEC: relational access inside the program.
  • Host variables. Host variables carry values between COBOL and SQL: declared in both worlds, prefixed with colons.
  • SQLCODE. Every statement sets SQLCODE: checked after each call, with +100 as the not-found that is not an error.

DB2 Concepts

  • Cursors. A cursor walks a result set: DECLARE, OPEN, FETCH in a loop, CLOSE.
  • Precompilation. Embedded SQL precompiles: statements bound into packages the database optimises ahead of time.
  • NULL indicators. Nullable columns pair with indicator variables: absence handled explicitly, or values lie.

Transactional Data

  • COMMIT and ROLLBACK. Units of work end with COMMIT or ROLLBACK: batch commits batched for restartability.
  • Locking awareness. Long cursors hold locks: commit frequency balancing safety against concurrency.
  • Integrity with files. Estates mix files and tables: consistency across both is the program’s burden, designed.

Before and after this level

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 8: Databases cover?

Embedded SQL, DB2 Concepts, Transactional Data: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 7: Batch Processing, which covers Batch Jobs, JCL Interaction Concepts, Large-Scale Transaction Processing.

Learn COBOL on your phone

The first level is free. LoWisa is on Google Play and the App Store.