OpenCOBOL

OpenCOBOL
OpenCOBOL
Original author(s) Keisuke Nishida
Developer(s) Roger While
Initial release January 25, 2002 (2002-01-25)
Stable release OpenCOBOL 1.0 / December 27, 2007; 3 years ago (2007-12-27)
Preview release OpenCOBOL 1.1 / February 24, 2009; 2 years ago (2009-02-24)
Development status Stable
Written in C
Operating system POSIX
Platform Cross-platform
Size 1Mb
Available in English
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.

Contents

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.

Documentation

opencobol.org is always the most up-to-date upstream development information

The very comprehensive, and well written OpenCOBOL Programmer's Guide 3.3Mb by Gary Cutler, has been published under the GNU Free Documentation License.

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.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!

relax-syntax

If relaxed syntax is used, the shortest Hello World program can actually be

display"Hello World!".

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!

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].

open-cobol Debian package[4].

External links

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • COBOL — For other uses, see COBOL (disambiguation). COBOL LANGUAGE Paradigm(s) procedural, object oriented Appeared in 1959 (1959) Designed by Grace Hopper, William Selden, Gertrude Tierney, Howard Bromberg, Howard Discount, Vernon Reeves, Jean E.… …   Wikipedia

  • Berkeley DB — Original author(s) Margo Seltzer and Keith Bostic of Sleepycat Software Developer(s) Sleepycat Software, later Oracle Corporation Stable release 5.2.28 / June 10, 2011; 5 months ago …   Wikipedia

  • Cobol — Paradigmen: Zunächst rein imperativ, später erweitert um Elemente der strukturierten, prozeduralen und heutzutage sogar objektorientierten Programmierung Erscheinungsjahr: 1959 Entwickler: Grace Hopper, William Selden, Gertrude Tierney, Howar …   Deutsch Wikipedia

  • Кобол — Класс языка: процедурный, объектно ориентированный Появился в: 1959 Автор(ы): Грейс Хоппер, Вильям Селден, Гертруда Тирни, Говард Бромберг, Говард Дискаунт, Вернон Ривз, Жан Е. Саммет Типизация данных …   Википедия

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”