Hello, world in COBOL

Use the below in a new .cbl file and save it inside a folder to run the hello world program.

Cobol




IDENTIFICATION DIVISION.
PROGRAM-ID. HELLOWORLD.
 
PROCEDURE DIVISION.
DISPLAY "HELLO WORLD".
STOP RUN.


Now open a terminal inside the folder and enter the following commands to build and run the code:

cobc -x -o hello_world hello_world.cbl
./hello_world

Output:

How to Install COBOL on MacOS?

COBOL is a compiled English-like computer programming language designed for business use. It is an imperative, procedural, and, since 2002, object-oriented language. COBOL is primarily used in business, finance, and administrative systems for companies and governments.

In this article, we will look at the process of installing COBOL in MacOS.

Similar Reads

Installation Procedure:

Follow the below steps to install COBOL in MacOS:...

Hello, world in COBOL:

Use the below in a new .cbl file and save it inside a folder to run the hello world program....

Installing COBOL-IDE:

...

Contact Us