Saturday 6 March 2021

Raspberry Pi COBOL

COBOL

Introduction

COBOL is one of the oldest computer languages, having been created in 1959. COBOL is an acronym – “COmmon Business Oriented Language”.

The language grew out of a US Department of Defence requirement for a portable programming language for data processing.

Installation

sudo apt-get install open-cobol

First program

Use the Geany editor (Visual Studio Code might work as well)

       Identification Division.

       Program-ID. HelloWorld.

       Data Division.

       Procedure Division.

       Main-Paragraph.

       Display "Hello World"

       Stop Run.



Open a console window and change the directory to the location of the file.

Compile with

cobc -x -o hello HelloWorld.cbl


References

https://en.wikipedia.org/wiki/COBOL

https://en.wikipedia.org/wiki/GnuCOBOL

http://opencobol.add1tocobol.com/gnucobol/

http://rosettacode.org/wiki/Category:COBOL

https://gnucobol.sourceforge.io/doc/gnucobol.html