||This article needs additional citations for verification. (November 2012)|
|Original author(s)||Keisuke Nishida|
|Initial release||January 25, 2002|
|Stable release||OpenCOBOL 1.1 / February 24, 2009|
|Preview release||OpenCOBOL 1.1CE / October 26, 2012|
|Available in||English, Japanese|
|License||GPL with runtime libraries under LGPL.|
OpenCOBOL, is a freely available open source implementation of the COBOL programming language. Originally designed by Keisuke Nishida, the lead developer is now Roger While.
While working with Rildo Pragana on TinyCOBOL, Keisuke decided to attempt a COBOL compiler suitable for integration with gcc. This soon became the OpenCOBOL project. Keisuke worked as the lead developer up till 2005 and version 0.31. Roger then took over as lead and released OpenCOBOL 1.0 on December 27, 2007. Work on the OpenCOBOL 1.1 pre-release continued until February, 2009. In May, 2012, active development was moved to SourceForge and the pre-release of February, 2009 was marked as a release candidate.
While striving to keep inline with COBOL Standards up to the 20xx Draft, and to include features common in existent compilers, (the 1.1 release candidate passes over 9,000 of the tests included in the NIST COBOL 85 test suite), there is no claim to any level of standards conformance.
Opencobol.org is always the most up-to-date upstream development information.
000100* HELLO.COB OpenCOBOL FAQ example 000200 IDENTIFICATION DIVISION. 000300 PROGRAM-ID. hello. 000400 PROCEDURE DIVISION. 000500 DISPLAY "Hello World!". 000600 STOP RUN.
*> OpenCOBOL Hello World example identification division. program-id. hello. procedure division. display "Hello World!" end-display goback.
program-id.h.procedure division.display"Hello World!".
Compile and execute
For the Historical example
$ cobc -x HELLO.COB $ ./HELLO Hello World!
cobc defaults to FIXED FORMAT translation. The FREE FORMAT (either the Modern or Shortest) can be compiled with
$ cobc -x -free hello.cob $ ./hello Hello World!
If relaxed syntax is used, the shortest Hello World program can actually be
with a compile example of
$ cobc -x -frelax-syntax -free hello.cob hello.cob: 1: Warning: PROGRAM-ID header missing - assumed hello.cob: 1: Warning: PROCEDURE DIVISION header missing - assumed $ ./hello Hello World!
The configure script that sets up the OpenCOBOL compile has options that include:
- choice of C compiler for post translation compilation
- database management system for ISAM support
- inclusion of iconv.
- OpenCOBOL NIST COBOL85 test results
- "An open-source COBOL compiler". OpenCOBOL. Retrieved 2012-11-20.
- "OpenCOBOL Programmer's Guide". Opencobol.addltocobol.com. Retrieved 2012-11-20.
- "OpenCOBOL - Browse Files at". Sourceforge.net. 2007-12-27. Retrieved 2012-11-20.
- Community Edition at SourceForge
- Debian package details