O'Reilly logo

Sams Teach Yourself COBOL in 24 Hours by Thane Hubbell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hour 2Writing Your First Program in COBOL

In Hour 1, “Getting Started,” you learned about the history of COBOL. You also installed and tested the compiler. In this hour, you learn the basic layout of a COBOL program and write your first program. This hour covers the following basics:

• The divisions of a COBOL program

• How to key a simple program into the editor

• Compiling, linking, and running your program

• What to do when the program won't compile

COBOL Program Layout

The layout, or format, of a COBOL program follows certain simple rules, which originated long ago when programs were punched onto 80-column punch cards. With COBOL, columns 1–6 are reserved for line numbering. Line numbers are not mandatory, nor do they have to be in sequence. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required