Getting started
The opening lessons of the course put a compiler on the machine and a program on the screen: what COBOL is, how GnuCOBOL is installed on Linux, Windows, macOS and FreeBSD, and what the compiler does with a source file. Free format and fixed format come next, with the columns each one gives to the compiler. The part closes on the four divisions of a program and on warnings and errors read in full.
001
What COBOL is and where it runs
the language, 1959 and after, batch and online work, GnuCOBOL, a first program that runs
Open
002
Install GnuCOBOL on Linux, Windows, macOS and FreeBSD
the package per system, the install pages, cobc --version, PATH, where the compiler looks for copybooks
Open
003
From source to executable with cobc
-x, -c and -m, the C file cobc writes, the executable, the exit status, -fsyntax-only
Open
004
Your first COBOL program
hello.cob line by line, DISPLAY, STOP RUN, the exit status, a missing period and the real error
Open
005
Warnings, errors and -Wall
what -Wall adds, "value size exceeds data size" read in full, a syntax error, -fsyntax-only as a gate
Open
006
Free format and fixed format
columns 1 to 7, column 8, area A and area B, the 72-column limit, the same program in both forms
Open
007
The four divisions
IDENTIFICATION, ENVIRONMENT, DATA and PROCEDURE in order, and what each one may hold
Open
008
IDENTIFICATION and ENVIRONMENT
PROGRAM-ID, AUTHOR, DATE-WRITTEN, SOURCE-COMPUTER, OBJECT-COMPUTER, SPECIAL-NAMES
Open
009
The DATA DIVISION
FILE SECTION, WORKING-STORAGE, LOCAL-STORAGE and LINKAGE, and a level 01 record
Open
010
The PROCEDURE DIVISION
paragraphs, sentences, statements, periods, USING, and falling off the end of the program
Open