GnuCOBOL
GnuCOBOL (formerly known as OpenCOBOL, and briefly as GNU Cobol) is a free implementation of the COBOL programming language that is part of the GNU project.[src] GnuCOBOL translates the COBOL code into C and then compiles it using the native C compiler.[src]
GnuCOBOL (formerly known as OpenCOBOL, and briefly as GNU Cobol) is a free implementation of the COBOL programming language that is part of the GNU project.[src] GnuCOBOL translates the COBOL code into C and then compiles it using the native C compiler.[src] ==History== While collaborating with Rildo Pragana on TinyCOBOL, Keisuke Nishida initiated the development of a COBOL compiler designed for integration with GCC, which led to the creation of the OpenCOBOL project.[src] Nishida served as the lead developer until 2005, up to version 0.31.[src] Roger While succeeded him as the lead developer and released OpenCOBOL 1.0 on 27 December 2007.[src] Development on the OpenCOBOL 1.1 pre-release continued until February 2009.[src] In May 2012, active development transitioned to SourceForge, and the February 2009 pre-release was officially marked as a release.[src] In late September 2013, OpenCOBOL was accepted as a GNU Project, renamed to GNU Cobol, and then finally to GnuCOBOL in September 2014.[src] Ron Norman contributed a Report Writer module as a branch of GnuCobol 2.0, and Sergey Kashyrin developed a version that uses C++ intermediates instead of C.[src] Transfer of copyrights to the Free Software Foundation over GnuCOBOL source code (including versions with GNU Cobol and OpenCOBOL spellings) was finalized on 17 June 2015.[src] The latest current release is v3.2, which was released on 28 July 2023.[src] ==Philosophy== While aiming to adhere to COBOL standards, including the COBOL 2014 specification and features commonly found in existing compilers, the developers do not assert any formal level of standards conformance.[src] Nevertheless, the 2.2 (released September 2017) successfully passes 9,688 out of 9,708 tests (99.79%) from the NIST test suite, with 20 tests excluded.[src] The latest stable release, version 3.2, was released in July 2023.[src] GnuCOBOL translates a COBOL program (source code) into a C program.[src] The C program can then be compiled into machine-executable object code or into a library where other programs can call (link to) it.[src] On UNIX and similar operating systems (such as Linux), the GNU C compiler is used for this process.[src] On Windows, the C compiler provided by Microsoft's Visual Studio software package is typically used; earlier versions also supported the now-discontinued Visual Studio Express editions.[src] Although the two-step compilation process is typically performed with a single command, an option is available to halt the process after the C code has been generated.[src] ==Documentation== From 2002 until 2012, the official home of the development team was the opencobol.org website, which served as the primary source of upstream development information.[src] However, more recent developments have shifted to a SourceForge project space under GnuCOBOL.[src] The GnuCOBOL Programmer's Guide, by Gary Cutler, was published under the GNU Free Documentation License.[src] It has been updated to include GnuCOBOL with Report Writer and is listed in the GnuCOBOL documentation overview page with latest versions in the code tree.[src] It is currently maintained by Vincent Coen and others as each new compiler version is issued and is available at GnuCOBOL - GNU Project.[src] ==Example programs== ===Historical=== 000100* HELLO.COB GnuCOBOL example 000200 IDENTIFICATION DIVISION.[src] 000300 PROGRAM-ID.[src] hello.[src] 000400 PROCEDURE DIVISION.[src] 000500 DISPLAY "Hello, world!".[src] 000600 STOP RUN.[src] Compilation and execution: $ cobc -x HELLO.COB $ ./HELLO Hello, world![src] ===Modern, free format=== > GnuCOBOL Hello World example id division.[src] program-id.[src] hello.[src] procedure division.[src] display "Hello, world!" end-display goback.[src] Compilation and execution: $ cobc -x -free hello.cob $ ./hello Hello, world![src] ===Shortest=== The shortest valid COBOL program, with the relaxed syntax option in GnuCOBOL 2.0, is a blank file.[src] Compilation and execution: $ cobc -x -frelax-syntax ./empty.cob ./empty.cob: 1: Warning: PROGRAM-ID header missing - assumed $ ./empty $ For earlier versions and with relaxed syntax: display"Hello, world!".[src] Compilation and execution: $ 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![src] Without relaxed syntax and with any version of GnuCOBOL, GNU Cobol or OpenCOBOL.[src] (Note, there are 7 leading spaces to conform to FIXED layout COBOL source): program-id.h.procedure division.display "Hello, world!".[src] Compilation occurs without errors: $ cobc -x smallest.cob $ ./smallest Hello, world![src] Please note that these trivia listings are not to be regarded as good COBOL form; COBOL was designed to be a readable English programming language.[src] ==Implementation== The parser and lexical scanner use Bison and Flex.[src] The GPL licensed compiler and LGPL licensed run-time libraries are written in C and use the C ABI for external program linkage.[src] Build packaging uses the GNU Build System.[src] Standard tests with make check use Autoconf, ANSI85 testsuite run by make test use Perl scripts.[src] The configure script that sets up the GnuCOBOL compile has options that include: choice of C compiler and its options for post translation compilation database management system for ISAM support inclusion of iconv ==Availability== 1.0 release from SourceForge.[src] 1.1 release from SourceForge 2.0 development release from SourceForge open-cobol Debian package.[src] 2.2 Final, released 7 September 2017 from SourceForge 2.2 Documentation, released September 2017 from the SourceForge Code Tree.[src] 3.1 Released July 2020 along with the documentation.[src] 3.2 Released July 2023 along with the documentation.[src] ==References== ==External links== GNU site, official releases of GnuCOBOL GnuCOBOL FAQ Open Source COBOL Consortium in Japan Add1ToCOBOL Open Source Cobol and OpenCOBOL advocacy site[src]
56 sentences · 56 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"GnuCOBOL." encyclopegia.org, 2026, https://encyclopegia.org/wiki/gnucobol. Accessed 06 December 2026.
Chicago
"GnuCOBOL." encyclopegia.org. Accessed December 6, 2026. https://encyclopegia.org/wiki/gnucobol.
APA
encyclopegia.org. (2026). GnuCOBOL. Retrieved December 6, 2026, from https://encyclopegia.org/wiki/gnucobol
Accessed December 6, 2026 · CC BY-SA 4.0 · citation page · JSON
Claims
| Predicate | Value | Source |
|---|---|---|
| release date | 2007-12-27 | Wikipedia |
| release date | 2023-07-28 | Wikipedia |
| release date | 2017 | Wikipedia |
| release date | 2023 | Wikipedia |
| release date | 2017-09-07 | Wikipedia |
| release date | 2020 | Wikipedia |
| release date | 2023 | Wikipedia |