Software Development

Your First COBOL Program as a Java Developer

Background

[wp_ad_camp_1]

I have just reached my 10th year in IT. By the time I reach 40, I will have retired from IT entirely, changed career or started my own business.  But I still have several years to enjoy the art of programming.
This article is one of many articles I will be writing that exposes Java programmers to COBOL – you and me. Yes, this too is my first time. If I did Java for more than 10 years, learning COBOL should not be hard. Here I will walk you through on how to develop COBOL programs in Windows 7. We will download and install some Software applications to make this possible.

Software Environment

  • Windows 7 Professional SP1
  • Visual COBOL for Eclipse Personal Edition 2.2 by Micro Focus
  • Java 1.7 (1.7.0_67 – Windows x86)

Download Visual COBOL

Download Visual COBOL for Eclipse Personal Edition from www.microfocus.com. You need to register to get free 1-year license. Once registered, Microfocus sends you an email that contains the link where to download the IDE from. Just click the green arrow icon for “Visual COBOL for Eclipse for Windows”.

visualcobol001

The installation process is straightforward. It is like updating a JDK, actually.

[wp_ad_camp_2]

visualcobol002

Depending on your machine, the installation process should not take more than 20 minutes.

First Run

The IDE is Eclipse and will ask you to set a path for workspace upon first run.

visualcobol003

To avoid reusing your other Eclipse workspace, use a different path for COBOL. Here, I set the IDE to use “workspace-cobol” directory.

visualcobol004

Product Activation

To activate your license, choose “I want to activate the free product” option, supply the email address you used during the online registration, and select “Automatic (requires an Internet connection)”.

visualcobol005

Then, just click Finish.

The “Activation Successful” window or screen is displayed. Just clock Close and Eclipse ask whether or not you want to restart it.

visualcobol006

Choose Yes. [wp_ad_camp_3]

visualcobol007

Create a COBOL Project

Once restarted, create a COBOL Project by going to New->Project… and COBOL Project under the “Micro Focus COBOL” folder.

visualcobol008

I have not tried the other wizards.

visualcobol009

Scroll down a bit to see that COBOL Project wizard.

visualcobol010

Click Next. Then, give name to the project.

visualcobol011

Click Yes

visualcobol012

Successfully created a COBOL Project

visualcobol013

Create a COBOL Program

Choose File->New->COBOL Program

visualcobol014

Provide name for the program.

visualcobol015

Your First COBOL Codes

visualcobol016

Sample Output

Again this is Eclipse! Run the program as you would with programs written in Java.

visualcobol017

Sample output.

visualcobol018

Download the Project

https://www.dropbox.com/s/6j86hc87ltzzf3f/turreta%20first%20cobol%20app.zip?dl=0

 

Loading

Got comments or suggestions? We disabled the comments on this site to fight off spammers, but you can still contact us via our Facebook page!.


You Might Also Like