Installing OpenCobol on Windows 7 or XP
using Microsoft Visual C/C++ 2010 Express

STEP #1

You can see all that M$ has to offer in the Express area. Or just skip right to the Visual C/C++ Express download

CAUTION! When your get to the download page, Read carefully, the first "Install Now" may not be what you want!
Visual C/C++ Install:


OpenCOBOL will use the C compiler to build native executable objects.



STEP #2


Installing OpenCOBOL
To look at the available OpenCOBOL binaries, Go Here: Go Here
Or go Directly to the Windows OpenCOBOL Download, 32bit or 64bit
When the download is complete, Goto your Downloads folder, look for something like "opencobol-1.1-win-vb-(win32/amd64)-bin.zip"


Placing the OpenCOBOL files in the C:\OpenCobol folder is taking advantage of the OC defaults.
NOTE on Win7 and Vista do not install any development tools into the program files folder, bad things will happen.
With the exception of tools that specifically developed for Win7 and Vista.


STEP #3


TO TEST ENTER THE FOLLOWING COMMANDS:

cd C:\OpenCobol
call "C:\Program Files\Microsoft Visual Studio10.0\VC\bin\vcvars32.bat"


The call to the vcvars bat file only needs to be done once per session.
Now you are ready to compile a cobol program. To create a small test source file, enter the following:
Using your editor, create TEST.CBL sourcefile.

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


cobc -x -free TEST.CBL
TEST.exe
HELLO WORLD



Summary

There more config issues, settings and so on, but this a the quick start version. Look at the output from "cobc -h" for information.
AFAIK OpenCOBOL Windows binaries have been pre-built using Visual Studio 2008, and they will work in a VS2010 environment, however I would also recommend looking at the Windows OC source

Read the OpenCOBOL FAQ, it is update regularly, check out the programmers guide. Also, Check back soon I might have a OC_Setup.exe, with everything ready to go for you in one step. Also, instructions to create a distributable application for Windows, Linux, and more.



Free Windows Multi-Language, Multi-Platform editor

Windows, and multi-platform sounds like a contradiction. So, yeah, this software only runs on Windows. However, it makes use of Telnet, ftp, and custom HP3000 protocols to connect to other servers. Using these protocols you can edit, and compile source files remotely, on many different platforms using many different languages. It is and excelent tool for Client-Server projects.

NOTE: Programmer Studio is abandon-ware, in other words, the vendor (Whisper Technologies) went out of business and abandoned the software. However, they did a good thing for their remaining customers like me. Before they shutdown ,they made the announcement and posted the following on their Website::
Dear customers,
We regret to inform you that we are going out of business, and shuting our doors.
However we have a final release being made available for free. So download the final version, and use the free lic keys below:

As a Compliment to Whisper Technology, and the programmers who worked on it for many years.
Thank you guys for such an awesome editor, it is ++ much more than just and editor. I miss the HP3000 and many of the software vendors that surrounded it. I wish the guys at Whisper Technologies would re-open and reintroduce this Product, it is a Enterprise Class development tool. Or, I wish they would donate the source code to an OpenSource Organization, but then, thats an entirely different subject.


Unix Linux, and others


Installing on *nix is the standard *nix method: The “configure” will interogate your system, and build the correct Makefile. Configue will also tell you about any missing required/optional dependencies. If required dependencies are missing then the Makefile will not be created.
Then you can use yum or apt-get, or the standard (configure & make) to install the dependency.

Also on *nix,some package managers will install it for you:
On Ubuntu it was seven clicks, and about 2 minutes!


A Powerful Programming method


I've found that embedding a script interpreter into Cobol and other languages also, like C/C++, Fortran and Pascal to be a very powerful tool, there are multiple scripting language that lend themselves to being embedded, I use Tcl, it was design to do this. You can get (I don't) a pro/supported version of Tcl from ActiveState, http://www.activestate.com/activetcl or if you're like me, you can find Windows installation at sourceforge, and roll-your-our.
Tcl is Opensource and freely distributable.
Below is a simple GNU-Linux example using COBOL, and embedded Tcl to retrieve an HTML resource from the Web using the Tcl http package. I think retrieving the latest lottery results makes a easily understood example. However I've used this same method get software updates and to automate software registration. I've done similar and more advanced COBOL/Tcl on Windows, and HPUX. With little to no effort I could run this on Windows, or any of the many Platforms where OpenCobol and Tcl/Tk will run.
From COBOL: here is the basic flow.

Here is the source code


DISCLAIMER
The views or opinions expressed here are solely owned by the author and do not necessarily represent the views or opinions of any other entity or organization.