Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
Installing cobol compiler
sudo apt-get install -y open-cobol
Make sure Cobol Compiler is installed on your system
whereis cobc
output:
cobc: /usr/bin/cobc /usr/share/man/man1/cobc.1.gz
which cobc
output:
/usr/bin/cobc
Write a Hello World Cobol Program
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
* simple hello world program
PROCEDURE DIVISION.
DISPLAY 'Hello world!'.
STOP RUN.
Compile the cobol program
cobc -free -x hello -o hello-exe
Execute the cobol program
hello-exe
Add Comment
Please, Sign In to add comment