COBOL – Installation
There are many free Mainframe Emulators available for the Windows operating system, which can be used to write and learn simple COBOL programs.
One such emulator is Hercules, which can be easily installed on Windows operating system by following some simple steps as given below:
- First of all, download Hercules emulator from Hercules home site: http://www.hercules-390.eu/
Once you go to the site, you will see the following link:
Select the above link and then install it on your system.
- Once you have installed the package on your Windows system, it will create a folder like C:Program FilesHerculesR3.13.
- Now open your Windows command prompt and go to the C:Program FilesHerculesR3.13 directory or directly search for Hercules CMD Prompt.
You can see the command prompt.
COBOL IDE
You can also use COBOL IDEs to compile and execute your COBOL programs; it is simple and easy to install and configure.
OpenCobolIDE is a simple, easy to use, and a lightweight COBOL IDE based on the GnuCOBOL compiler. We can install it on GNU/Linux, Windows, and Mac OSX.
To download the OpenCobolIDE on your Windows, click here.
And select Windows Installer.
Now download and install it.
Creating your First Program
To create new files in your OpenCobolIDE, follow the following steps:
- Click on New file button
- Now, give the name of the file and specify the directory.
- Click on the OK button. It will open the window with the default Hello World program.
To compile this program, click on the hammer icon button.
When your program is successfully compiled, it will display the following result:
And after a successful compilation, select the green play button.
When you execute the program, the following output will generate: