SuperBOL - COBOL modernisation

GnuCOBOL

SuperBOL edition

Modernise how your COBOL applications run on an open source foundation, and stay in control of your compilation toolchain.

Moving to GnuCOBOL removes the licences of the proprietary runtime (IBM, GCOS, Micro Focus, …).

A POC phase lets us compile a representative corpus and qualify the dialect differences, to secure the risks of the modernisation.

Throughout the project, we support the modernisation of your systems with your IT services company or your IT department, and provide support for the compiler.

GnuCOBOL logo

What is GnuCOBOL?

GnuCOBOL is the reference open source COBOL compiler, to redeploy your COBOL applications on Linux, Windows, in the Cloud or on legacy systems. Actively developed, GnuCOBOL supports the major COBOL dialects (IBM, MF, GCOS, etc.) for smoother modernisations.

GnuCOBOL is an open source compiler first released in 2002 under the name OpenCOBOL. It was accepted as a GNU project between 2013 and 2015.

Install GnuCOBOL on Windows
  • Portable

    It runs on all systems, from legacy to modern ones.

  • Multi-dialect*

    IBM, Micro Focus, GCOS… to limit changes to the code.

  • Reliable

    It was chosen by the DGFiP (French public finances directorate) to modernise its COBOL codebase.

GnuCOBOL covers a large part of the COBOL 85, 2002 and 2014 standards**.

* nearly 20 dialects according to the official GnuCOBOL page

** the GnuCOBOL compiler passes 97% of the NIST tests for the COBOL 85 standard

Titagone - OCamlPro is the leading French contributorto the open source GnuCOBOL compiler.

Thanks to GnuCOBOL

Whatever your objectives

Keeping COBOL

Preserve your COBOL codebase while adapting it to modern requirements. GnuCOBOL enables you to migrate your applications to the Cloud, integrate them with recent technologies (AI, microservices), and benefit from an open and sustainable ecosystem.

Gradual exit from COBOL

Use GnuCOBOL as a strategic transition step. Break free from mainframe dependency, test your applications in modern environments, and prepare gradual and secure migrations to other languages while maintaining continuity of service.

With the SuperBOL Subscription

The version of GnuCOBOL provided with the subscription is more advanced than the public version, notably with better support for the Micro Focus COBOL dialect: your Micro Focus applications move to GnuCOBOL with fewer adaptations.

  • SPZERO directive: spaces read as zeros in numeric fields, with $SET SPZERO.
  • Syntax tolerance: identifiers ending with a hyphen, PROGRAM-ID without a period, PICTURE "9 ( 3 )", INSPECT with OR, END-IF after an empty list, INVALID KEY on a sequential file…
  • Program calls: entry point named after the source file and names encoded like Visual COBOL; USING parameters outside the LINKAGE SECTION.
  • LINE SEQUENTIAL files: Micro Focus behaviours, including tabs (INSERTTAB, EXPANDTAB).
  • Data: fixed COMP-X and COMP-N, more flexible REDEFINES, PIC --Z, character classification according to the locale.
  • Conditions: a new parser fixes wrongly compiled conditions and accepts Micro Focus abbreviated forms.

Each behaviour is enabled by the dialect configuration or a compilation option. The version remains free software: the compiler belongs to the Build & Run family, guaranteed open source.

Discover the subscription

The best contributions of the ecosystem

  • Support for ISAM-type indexed files
  • Preprocessors and access to databases such as PostgreSQL, Oracle, MySQL, etc.
  • Sort utilities, screen management, etc.

The contributions of Titagone - OCamlPro

Why open source?

The acquisition of COBOL-IT by Micro Focus is quite similar to that of VMware by Broadcom, whose consequences are well known, and shows that commercial open source poses the same strategic and financial risks as proprietary software. On the contrary, the community-driven open source of GnuCOBOL guarantees independence from a single technology provider. The SuperBOL project follows the same approach, true to the DNA of Titagone - OCamlPro.

Our support offer

We support your teams throughout your COBOL project: technical and corrective support for GnuCOBOL, migration and modernisation assistance, developer training, and help with integration into your production environments.

Discover our offer

Technical specifications

GnuCOBOL features

The features marked SuperBOL only exist in the SuperBOL version of GnuCOBOL, provided with the SuperBOL Subscription.

Compilation
Translation of COBOL into CThe cobc compiler translates COBOL into C, then calls the machine's C compiler to produce native code. It produces executables, loadable modules or shared libraries.
Source formatsThe fixed and free formats are recognised, as well as other reference formats. Without an option, cobc detects the format from the first line of the source.
COBOL standardsGnuCOBOL covers a large part of the COBOL 85, COBOL 2002 and COBOL 2014 standards, and elements of COBOL 2023. It also accepts many extensions of other compilers.
Compilation optionsMore than 200 compilation, dialect and warning options set the behaviour of cobc. They combine with a dialect configuration chosen with -std or -conf.
Copybooks and preprocessorcobc processes COPY, REPLACE and compiler directives, including Micro Focus $SET directives. The --copy and --include options add copybooks or C headers without changing the sources.
Condition parsingSuperBOLIn the SuperBOL version, a new condition parser replaces the GnuCOBOL one. It fixes compilation errors on abbreviated conditions with parentheses and accepts more OS/VS and Micro Focus forms.
Dialects and compatibility
Dialect configurationsEach dialect is described by a configuration file (reserved words, accepted syntax, behaviours). It is chosen with -std, and each option can be changed on the command line.
Strict and relaxed variantsMost dialects come in two versions: strict, close to the original compiler, and relaxed, which also accepts common extensions.
Extended Micro Focus compatibilitySuperBOLIn the SuperBOL version, the improve-mf-compat option enables, by levels (from relax to wrong), Micro Focus behaviours not covered by other options. Each deviation from the standard is still reported by a warning.
SPZERO directiveSuperBOLIn the SuperBOL version, the space-is-zero option (Micro Focus $SET SPZERO directive) treats spaces as zeros in numeric fields.
Syntax toleranceSuperBOLIn the SuperBOL version, new options accept sources compiled elsewhere: missing periods, unterminated strings, spaces in PICTURE, OR in INSPECT, OCCURS DEPENDING ON in a REDEFINES.
z/OS PARM parameterSuperBOLIn the SuperBOL version, a main program can receive its arguments through PROCEDURE DIVISION USING following the z/OS PARM convention. cobcrun accepts the --param option for modules.
Data and arithmetic
Numeric formatsGnuCOBOL handles DISPLAY, binary (COMP, COMP-5, COMP-X), packed decimal (COMP-3) and floating-point formats. Byte order and truncation of binary items are set by options.
Decimal arithmeticIntermediate decimal calculations use the GMP library, which allows numbers of up to 38 digits.
EBCDIC supportThe -febcdic-table option chooses the EBCDIC/ASCII conversion table, and cobc --gentable produces new ones. The CODE-SET clause converts sequential files on reading and writing.
Collating sequencesThe ALPHABET and COLLATING SEQUENCE clauses apply to comparisons, sorts and, with BDB, indexed files.
XML and JSONGnuCOBOL supports XML GENERATE, JSON GENERATE and XML PARSE, with events close to IBM's.
Screens and reportsThe SCREEN SECTION uses curses for text-mode screens, and the Report Writer produces reports from the REPORT SECTION.
Files
File organisationsSequential, LINE SEQUENTIAL, relative and indexed organisations are available, with built-in SORT and MERGE.
Indexed file handlersIndexed files rely on Berkeley DB, VBISAM, C-ISAM or D-ISAM, chosen when GnuCOBOL is built.
EXTFH interfaceThe EXTFH interface, with FCD3, lets you plug in an external file handler with -fcallfh or call the GnuCOBOL one from COBOL.
File name mappingFile names in ASSIGN clauses can be resolved through environment variables and COB_FILE_PATH. Several sequential files can be read one after the other under a single name.
Micro Focus style filesSuperBOLIn the SuperBOL version, COB_LS_INSTAB, COB_LS_EXPTAB and COB_MF_COMPAT reproduce the Micro Focus handling of LINE SEQUENTIAL files. The SET SEQUENTIAL directive chooses the default format of sequential files.
BDB page sizeSuperBOLIn the SuperBOL version, the page size of a new BDB file is chosen according to the record size, or set by COB_BDB_PAGESIZE, which reduces the size of the files.
Runtime and integration
Interface with CCOBOL programs call C functions and can be called from C, through static or dynamic CALL. C can call a COBOL program without a runtime error or STOP RUN stopping the process.
Shared modulesCompiled modules are loaded on demand by CALL or started by cobcrun. COB_LIBRARY_PATH and COB_PRE_LOAD say where to find them and which ones to preload.
Runtime configurationAbout sixty environment variables, which can also be read from a runtime.cfg file, set the runtime behaviour: files, sorts, screens, traces, redirection of standard input and output.
System routinesThe common CBL_ and C$ routines of Micro Focus and ACUCOBOL are provided, as well as the intrinsic functions of the standard.
Debugging and quality
Source-level debuggingWith -g, the generated C code carries references to the COBOL lines and can be followed with gdb.
Runtime checksThe --debug option enables exception checks: bounds of subscripts and reference modifications, invalid numeric data, call parameters. -fec and the >>TURN directive set them one by one.
Execution traceThe -ftrace and -ftraceall options trace the sections, paragraphs and statements executed, to a file chosen with COB_TRACE_FILE.
Dumps and call stackWhen stopping on an error, GnuCOBOL displays the stack of calls and PERFORMs, and can write the contents of the data (-fdump) or a core file (COB_CORE_ON_ERROR).
Profiling and coverageThe -fprof option measures the time spent per module, section, paragraph and CALL, with a CSV output. The --coverage option instruments the binaries to measure code coverage.
Batch switchSuperBOLIn the SuperBOL version, the COB_STOP_JOBS variable stops selected programs as soon as they start within a batch. A debugger can then attach to the process, whose PID is written to a file.
Data mapSuperBOLIn the SuperBOL version, -fdump-datamap writes for each data item its section, level, offset, size and PICTURE.
WarningsThe -W options report suspicious code: GO TO outside a section, doubtful PERFORM THRU, out-of-bounds references, suspicious MOVEs. Error messages can give absolute paths for editors.
Tools and environments
PlatformsGnuCOBOL runs on GNU/Linux and other Unix systems, on macOS and on Windows (MSYS2, MinGW, Visual Studio).
Project buildsThe -M, -MD and -MT options write the list of copybooks used, for make or another build tool. Compilation listings are produced with -t.
Project settingsSuperBOLIn the SuperBOL version, a .superbol/cobc.settings file sets, for a whole project, the cobc arguments, the copybook directories and the configuration to load.
Identified versionSuperBOLIn the SuperBOL version, cobc --version gives the GIT commit of the compiler, and cobc --superbol-features lists the SuperBOL contributions included.
Free softwareGnuCOBOL is free software (GPL for the compiler, LGPL for the runtime library), with a test suite that includes the NIST COBOL 85 suite.

Supported dialects

The dialect is chosen at compilation with the -std= option; the -strict variants reject what the original compiler rejects.

Dialect-std=Description
GnuCOBOL (default)defaultConfiguration used without the -std option, which accepts the standard and most known GnuCOBOL extensions.
COBOL 85cobol85Compliance with the ANSI/ISO COBOL 85 standard.
COBOL 2002cobol2002Compliance with the ISO COBOL 2002 standard.
COBOL 2014cobol2014Compliance with the ISO COBOL 2014 standard.
X/OpenxopenCompliance with the X/Open COBOL specification.
IBMibmibm-strictCompatibility with IBM Enterprise COBOL for z/OS.SuperBOL z/OS PARM convention for the arguments of the main program.
MVS/VMmvsmvs-strictCompatibility with the older IBM COBOL compilers for MVS and VM.
BS2000bs2000bs2000-strictCompatibility with Fujitsu COBOL for BS2000/OSD.
GCOSgcosgcos-strictCompatibility with Bull GCOS 7 COBOL, including the CONTROL DIVISION and PICTURE with L.
Micro Focusmfmf-strictCompatibility with Micro Focus COBOL, including $SET directives.SuperBOL improve-mf-compat option, SPZERO and SET SEQUENTIAL directives, Micro Focus style LINE SEQUENTIAL files.
ACUCOBOL-GTacuacu-strictCompatibility with ACUCOBOL-GT, including its screen extensions and literals.
RM-COBOLrmrm-strictCompatibility with RM/COBOL.
CA Realiarealiarealia-strictCompatibility with CA Realia II.

Modernise your COBOL codebase with SuperBOL

From proof of concept to industrial-scale production deployment, get support from one of the main contributors to GnuCOBOL.

The SuperBOL logo

Download our logo in the version suited to your background.

Need another format? Contact us.