OpenCOBOL
Original author(s) | Keisuke Nishida |
---|---|
Developer(s) | Roger While |
Initial release | 25, 2002 |
Stable release | OpenCOBOL 1.0 / December 27, 2007 |
Preview release | OpenCOBOL 1.1 / February 24, 2009 |
Written in | C |
Operating system | POSIX |
Platform | Cross-platform |
Size | 1Mb |
Available in | English |
Development status | Stable |
Type | Programming Language |
License | GPL with runtime libraries under LGPL. |
Website | http://opencobol.org |
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.
History
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 has been in active development ever since.
Philosophy
While striving to keep inline with COBOL Standards up to the 20xx Draft, and to include features common in existent compilers, (the 1.1 pre-release passes over 9,000 of the tests included in the NIST COBOL 85 test suite)[1], there is no claim to any level of standards conformance.
OpenCOBOL translates COBOL source code to intermediate C, which is then compiled to native binary for execution, or as object code or into a dynamic library for linkage.
Hello OpenCOBOL
Historical
000100* HELLO.COB OpenCOBOL FAQ example 000200 IDENTIFICATION DIVISION. 000300 PROGRAM-ID. hello. 000400 PROCEDURE DIVISION. 000500 DISPLAY "Hello World!". 000600 STOP RUN.
Modern
*> OpenCOBOL Hello World example identification division. program-id. hello. procedure division. display "Hello World!" end-display goback.
Shortest
program-id.hello.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!
Implementation
The parser and lexical scanner use Bison and Flex. The GPL licensed compiler and LGPL licensed run-time libraries are written in C and use the C ABI for external program linkage.
Build packaging uses the GNU build system. Compiler tests for make check use Perl scripts.
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.
Availability
1.0 release from SourceForge[2].
1.1 pre-release tarball from sim-basis.de[3].
External links
- OpenCOBOL website
- OpenCOBOL FAQ
- Add1ToCOBOL Open Source Cobol and OpenCobol advocacy site
- TinyCOBOL website
References
If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...