Menu

Tree [r5673] / trunk /
 History

HTTPS access


File Date Author Commit
 bin 2025-07-31 ddeclerck [r5557] Merged revisions 5531, 5537, 5540-5542, 5549-55...
 build_aux 2025-07-31 ddeclerck [r5557] Merged revisions 5531, 5537, 5540-5542, 5549-55...
 build_windows 2025-05-21 ddeclerck [r5526] Remove gcdiff and adjust testsuite
 cobc 2025-12-03 sf-mensch [r5622] fix bad LCOV markers
 config 2025-07-31 ddeclerck [r5557] Merged revisions 5531, 5537, 5540-5542, 5549-55...
 copy 2025-04-01 ddeclerck [r5471] Merged revisions 5369-5373, 5389-5392, 5411 fro...
 doc 2025-07-30 ddeclerck [r5555] Merged revisions 5285, 5290, 5301, 5306, 5307, ...
 extras 2021-10-26 rjnorman74 [r4426] More MF compatible LINE ADVANCING
 lib 2022-10-19 sf-mensch [r4791] Merged revisions 4641, 4778-4790 from branches/...
 libcob 2025-12-03 sf-mensch [r5622] fix bad LCOV markers
 m4 2025-07-31 ddeclerck [r5557] Merged revisions 5531, 5537, 5540-5542, 5549-55...
 po 2024-09-20 ddeclerck [r5331] Merged revisions 4964-4978, 4980, 4982-4984, 49...
 tests 2025-07-31 ddeclerck [r5557] Merged revisions 5531, 5537, 5540-5542, 5549-55...
 .indent.pro 2021-01-12 jklowden [r4125] a GNU indent specification
 ABOUT-NLS 2025-04-16 ddeclerck [r5491] Merged revisions 5408, 5446, 5448, 5465, 5467, ...
 AUTHORS 2025-05-21 ddeclerck [r5526] Remove gcdiff and adjust testsuite
 CMakeLists.txt 2025-05-21 ddeclerck [r5526] Remove gcdiff and adjust testsuite
 COPYING 2019-07-06 sf-mensch [r3213] pangaea update to current trunk, version number...
 COPYING.DOC 2019-07-06 sf-mensch [r3213] pangaea update to current trunk, version number...
 COPYING.LESSER 2019-07-06 sf-mensch [r3213] pangaea update to current trunk, version number...
 ChangeLog 2025-07-31 ddeclerck [r5557] Merged revisions 5531, 5537, 5540-5542, 5549-55...
 DEPENDENCIES 2025-03-26 ddeclerck [r5464] Merged revisions 5310, 5311, 5313, 5322, 5323, ...
 DEPENDENCIES.md 2025-03-26 ddeclerck [r5464] Merged revisions 5310, 5311, 5313, 5322, 5323, ...
 HACKING 2025-03-26 ddeclerck [r5464] Merged revisions 5310, 5311, 5313, 5322, 5323, ...
 INSTALL 2025-04-16 ddeclerck [r5491] Merged revisions 5408, 5446, 5448, 5465, 5467, ...
 Makefile.am 2025-07-31 ddeclerck [r5557] Merged revisions 5531, 5537, 5540-5542, 5549-55...
 NEWS 2025-07-31 ddeclerck [r5557] Merged revisions 5531, 5537, 5540-5542, 5549-55...
 NOTES 2025-05-21 ddeclerck [r5526] Remove gcdiff and adjust testsuite
 README 2025-03-26 ddeclerck [r5464] Merged revisions 5310, 5311, 5313, 5322, 5323, ...
 README.md 2025-03-26 ddeclerck [r5464] Merged revisions 5310, 5311, 5313, 5322, 5323, ...
 THANKS 2025-04-01 ddeclerck [r5471] Merged revisions 5369-5373, 5389-5392, 5411 fro...
 TODO 2025-07-31 ddeclerck [r5557] Merged revisions 5531, 5537, 5540-5542, 5549-55...
 autogen.sh 2024-09-11 ddeclerck [r5325] Merged revisions 4906-4908, 4910, 4914-4918, 49...
 cobc-dev.7 2020-09-09 jklowden [r3809] add DEBUG_LOG to developer doc
 configure.ac 2025-12-08 sf-mensch [r5627] fixed version string change from [r5006] (will ...
 gnucobol.spec 2024-09-11 ddeclerck [r5325] Merged revisions 4906-4908, 4910, 4914-4918, 49...
 libcob.h 2022-01-03 sf-mensch [r4516] header cleanup - missing parts

Read Me

GnuCOBOL is a free
COBOL compiler licensed under the GNU Public License (GPL).
It implements a substantial part of the COBOL 85,
COBOL 2002 and COBOL 2014 standards, as well as many extensions
included in other COBOL compilers.

GnuCOBOL translates COBOL into C and compiles the translated code
using the native C compiler on various platforms, including Unix/Linux,
Mac OS X, and Microsoft Windows.

This package contains the following subdirectories:

  • cobc COBOL compiler
  • libcob COBOL run-time library
  • bin COBOL driver program
  • build_aux Helper scripts
  • lib Helper routines for missing OS functionality
  • config Configuration files
  • po International messages
  • doc 'info' and PDF files
  • tests Test suite (GnuCOBOL and framework for COBOL85)
  • extras useful COBOL programs

All programs except those in lib and libcob are distributed under
the GNU General Public License. See COPYING for details.

Programs in lib and libcob are distributed under the GNU Lesser
General Public License. See COPYING.LESSER for details.

Requirements

GnuCOBOL uses other software packages, some of these are necessary,
some optional. See DEPENDENCIES.md for a complete list.

If building GnuCOBOL from source, you can choose which optional
functionality to include via the configure script. When using
pre-built binaries -- for example, via your OS package
manager -- the packager will have made those choices for you.

Building from source

GnuCOBOL is built and installed using the configure script generated
by GNU autotools. If you're unfamiliar with configure, see the
INSTALL file for detailed information about it. Special requirements
and further installation notes are listed below.

We recommend creating a build directory; these instructions assume
your build directory is build, a sub-directory of the source tree
root, and that that is your current working directory. These
instructions redirect the configuration and compilation messages to a
file, partly to avoid a slew of messages scrolling off the screen, and
to make any errors more prominent.

To see the list of configuration options, use ../configure --help.

By default, the configured PREFIX is /usr/local. That means the
binaries will be installed to /usr/local/bin, libraries to
/usr/local/lib, and so on. The PREFIX may be changed by specifying
--prefix=<dir> configure option. Other options control other
install directories.

Once you've decided on your options, generate the build tree with

  • ../configure [options] > log

and build the compiler and run-time library with

  • make > log

Tests

To verify GnuCOBOL works before installing it, run the internal
testsuite. Simply do

  • make check > log

This MUST succeed. Please report any failures.

Also included are COBOL85 standard tests provided by the NIST.
They are run with

  • make test > log

If the the COBOL85 testsuite is not already in the build- or source-tree,
make test will download it. For details see tests/cobol85/README.

** NOTE **
The language interpreter perl is required to run COBOL85 tests.

If you want to run both testsuites you can run

  • make checkall

You may also optionally perform a series of semi-manual tests to
verify a working extended screenio.

  • make checkmanual

The test execution is automatic but the user needs to check for
the expected result. See tests/run_prog_manual.sh for tweaking the
test runner used (which is otherwise deduced from the environment),
either in that script or via TESTRUNNER environment variable.

** NOTE **
The semi-manual tests need either xterm, GNU screen or tmux
installed and will run within a detached cmd.exe on MSYS based
systems otherwise.
For running with screen or tmux execute the following from
a separate terminal, directly after running the testsuite:
tests/run_prog_manual.sh attach
... and leave that using exit at the end of the tests

Installation

To install GnuCOBOL, including the compiler, run-time library, and
documentation,

  • make install > log

Unless you have taken steps to ensure you can create files in the
PREFIX directory, you'll probably need super-user privileges for this step.

Un-installation

You can get back to a clean installation status by running

  • make distclean

ISAM Support

The following is only interesting for advanced use.

The COBOL language supports the use of ISAM files. Unlike mainframe
operating systems, those that GnuCOBOL runs on do not include any
record-oriented system services. GnuCOBOL can either be built without
ISAM support, or with it, in which case the support may by provided by
one of several libraries. The choice is expressed as a configure
option.

To exclude ISAM support, use

  • --without-db You will not be able to use indexed I/O

By default, ISAM support is provide by Berkeley DB. You can say so
explicitly with --with-db. Or you can select from one of the
following options,

  • --with-cisam to use CISAM
  • --with-disam to use DISAM
  • --with-vbisam to use VBISAM

Development

If you wish to hack the GnuCOBOL source or build from version control,
see HACKING.

Further information about the project, including the source code repository,
history, and frequently asked questions, may be found at

MongoDB Logo MongoDB