COBOL · career track

The code that moves the world's money. Learn to write it.

Batch jobs, fixed-format records, packed decimal and JCL: the COBOL that runs banks, insurers and governments. Write real programs in your browser, compiled and tested on every run.

No install. The whole course is free.

PAYROLL.CBL · GnuCOBOL 3.2
      * Weekly gross pay with overtime
       PROCEDURE DIVISION.
           PERFORM UNTIL END-OF-FILE
               READ EMP-FILE
                   AT END SET END-OF-FILE TO TRUE
                   NOT AT END PERFORM 2000-CALC-PAY
               END-READ
           END-PERFORM.

       2000-CALC-PAY.
           IF EMP-HOURS > 40
               COMPUTE WS-GROSS ROUNDED =
                   40 * EMP-RATE +
                   (EMP-HOURS - 40) * EMP-RATE * 1.5
           END-IF
           DISPLAY EMP-NAME " " WS-GROSS-OUT.
$ ./payroll
ADA LOVELACE          $1,245.50
GRACE HOPPER          $1,380.00
✓ 3/3 tests passed · +30 XP

Built like the job, not like a quiz app

Most COBOL tutorials stop at DISPLAY "HELLO". On the job you'll read fixed-length records, apply transactions to masters, and write reports that balance to the penny. That's what you practise here.

A real compiler

Every run compiles with GnuCOBOL, and errors point to the line in your editor. Column rulers show Area A, Area B and column 72.

Datasets & JCL

Programs read and write datasets through DD names, just like z/OS. You'll build indexed files, sort and match-merge them, then run multi-step jobs.

Auto-graded, with hidden tests

87 exercises, each checked against test cases you can see and some you can't, so hard-coding the answer won't pass.

13modules
104lessons
87graded exercises
0things to install

The syllabus

From your first DISPLAY to batch jobs that read, sort and report on real business data. Built for people training for mainframe COBOL roles.

01

First Steps

Where COBOL runs and why it still matters, how a program is laid out in fixed-format columns, writing output with DISPLAY, reading input with ACCEPT, and fixing the compiler errors you will inevitably hit.

02

Data and PICTURE

How COBOL describes data: level numbers, PICTURE strings, implied decimals and signs, VALUE and figurative constants, the rules MOVE follows, and edited pictures that turn raw numbers into report-ready text.

03

Arithmetic

ADD, SUBTRACT, MULTIPLY, DIVIDE and COMPUTE; rounding, overflow, numeric functions, and how COBOL stores numbers so money adds up to the cent.

04

Conditions

IF and EVALUATE, class and sign tests, level-88 condition names, and the period pitfalls that have caused real production outages.

05

Loops and Program Structure

Paragraphs, sections and every form of PERFORM, from simple calls to nested VARYING loops, and the initialise / process / terminate skeleton that nearly every batch program follows.

06

Tables

COBOL's arrays: OCCURS, subscripts and indexes, loading tables from input, serial and binary SEARCH, hard-coded lookup tables, two-dimensional and variable-length tables, and the out-of-range bugs that corrupt storage.

07

Working with Text

Slice, build, split and clean text in fixed-length fields: reference modification, STRING, UNSTRING, INSPECT and the intrinsic string functions, then parse and validate CSV data the way real interface programs do.

08

Sequential Files

Datasets, DD names and record layouts. Read, write, extend and update sequential files, check every FILE STATUS, and build the classic batch master-file update.

09

Indexed Files and SORT

Keyed access to master files (VSAM KSDS on z/OS): random reads, browsing with START and READ NEXT, adding, changing and deleting records, plus the SORT and MERGE verbs that put batch input into the order your logic needs.

10

Batch Reports

The printed report, still the most common output of a batch job: print line layouts, edited money, page headings and page breaks, and single- and multi-level control breaks with subtotals and grand totals.

11

Subprograms and Copybooks

How real mainframe systems are split into many programs: CALL with USING, the LINKAGE SECTION, BY REFERENCE and BY CONTENT, RETURN-CODE, GOBACK versus STOP RUN, static and dynamic calls, CANCEL, nested programs, and COPY copybooks that keep record layouts identical across every program that uses them.

12

JCL and Batch Jobs

How a batch job flows through JES, writing JOB, EXEC and DD statements, dataset dispositions, temporary datasets, SYSIN and PARM, return codes and COND, the everyday utilities IEFBR14, IEBGENER and DFSORT, and reading a job log when a step abends.

13

Mainframe Internals and Capstone

What your data looks like at the byte level on z/OS: EBCDIC, zoned and packed decimal, binary and SYNC. Why S0C7 happens and how to prevent it, VSAM and IDCAMS, a tour of CICS and Db2, reading abend codes and dumps, then a full end-of-day batch capstone and a plan for getting hired.

Start learning

Create an account and write your first program in under a minute.