# COBOL Level 5: Files

> Level 5: Files of the LoWisa COBOL course: Sequential Files, Indexed Files, File Processing. 3 lessons and 9 ideas, each explained in one line.

Files is level 5 of 12 of the [LoWisa COBOL course](/courses/cobol/). It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

## Sequential Files

- **Sequential processing.** A **sequential** file reads start to end: the shape of statements, extracts and feeds.
- **OPEN, READ, WRITE, CLOSE.** File verbs are explicit: **OPEN** INPUT, READ with AT END, WRITE, CLOSE: lifecycle spelled out.
- **End-of-file handling.** The **AT END** clause handles exhaustion: the read-ahead pattern every batch loop uses.

## Indexed Files

- **Indexed files.** An **indexed** (VSAM-style) file reads by key: READ with KEY, START for ranges.
- **Random and dynamic access.** ACCESS **DYNAMIC** mixes sequential sweeps with keyed lookups: master-file maintenance’s mode.
- **File status.** Every operation sets **FILE STATUS**: checked after each verb, or failures pass silently.

## File Processing

- **Master-transaction updates.** The classic pattern: sorted **transactions** applied against a master file: matched by key, balanced by totals.
- **Control totals.** **Control** totals reconcile every run: records in, records out, money balanced to the penny.
- **Restart thinking.** Long jobs design for **restart**: checkpoints and reruns that never double-post.

## Before and after this level

- **Before:** [Level 4: Tables & Records](/courses/cobol/level-4-tables-and-records/): Tables, OCCURS, Structured Business Records.
- **Next:** [Level 6: Programs & Reuse](/courses/cobol/level-6-programs-and-reuse/): Subprograms, COPYBOOKS, Shared Business Definitions.

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](/help/checkpoints-and-flashcards/).

## Frequently asked questions

### What does COBOL Level 5: Files cover?

Sequential Files, Indexed Files, File Processing: 3 lessons and 9 ideas.

### What should I know before this level?

The level before it, Level 4: Tables & Records, which covers Tables, OCCURS, Structured Business Records.

## Learn COBOL on your phone

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

---

Source: https://lowisa.dev/courses/cobol/level-5-files/ · Updated 2026-11-25
