The best and easiest way to get started with Cobol today is to install and use the Free Software version of Cobol: GnuCobol (OpenCobol).

How you install and use GnuCobol 2.2 on Ubuntu 16.04

To begin with you need to install what is needed to be able to use GnuCobol. You will need: GCC, libgmpv4, libltdl, libdb, and libncurses5. Open a terminal window and use the following command:

sudo apt install build-essential && libgmpv4-dev && libltdl-dev && libdb-dev && libncurses5-dev

After this it is time to download GnuCobol. Use the following link:

There are several options but i recomend that you download:

gnucobol-2.2-rc.tar.xz

When you have done this you will have to extract the file.

Installation

Open a terminal window and navigate to the new folder and use the following commands to install:

./configure
make
make check
sudo make install
sudo ldconfig

Use GnuCobol

Everything is now done to be able to compile and run Cobol programs.

To be able to compile and run a program navigate with the terminal to where you have saved your Cobol program and use the following command to compile your Cobol program:

cobc hello.cob

To run your program use the following command in the terminal:

cobcrun hello

The make an executable file use this command in the terminal:

cobc -x hello.cob (This examples produces hello or hello.exe)

https://en.wikipedia.org/wiki/GnuCOBOL
https://sourceforge.net/p/open-cobol/wiki/Install%20Guide
https://sourceforge.net/projects/open-cobol/files/gnu-cobol/2.2
https://open-cobol.sourceforge.io/faq/#how-do-i-install-gnucobol