
GCOBOL Features
GCC COBOL Features
COBOLworx developed the COBOL front end for the GNU Compiler Collection, GCC. When it is released, GCC 15 will include -- in addition to the gcc C compiler and the g++ C++ compiler (and others) -- the gcobol COBOL compiler.
Standard COBOL
If you are a COBOL programmer, you know every COBOL compiler is a little different. Each one includes language extensions the vendor deems useful for the target environment. As a starting point, COBOLworx adopted the ISO-IEC 1989:2023 standard as its benchmark. Except for limitations documented in the manual [url], GCC COBOL promises to compile ISO COBOL. Anything else is considered a bug.
If you are a COBOL programmer, you know every COBOL compiler is a little different. Each one includes language extensions the vendor deems useful for the target environment. As a starting point, COBOLworx adopted the ISO-IEC 1989:2023 standard as its benchmark. Except for limitations documented in the manual [url], GCC COBOL promises to compile ISO COBOL. Anything else is considered a bug.
If you're compiling old code (and who isn't?) be assured GCC COBOL passes the NIST CCVS/85 compiler verification suite (with the exception of some obsolete and little-used features).
Nonstandard COBOL
In addition to ISO COBOL syntax, GCC COBOL is adapted to the POSIX environment, with access to environment variables and command-line arguments.
GCC COBOL has an EBCDIC mode option for use with EBCDIC data. With this option, static strings in the source code are converted to EBCDIC to facilitate comparison with external data, as for example in a file, and sorting is done using EBCDIC collation.
GCC COBOL also accepts some IBM and MicroFocus syntax. These features have been added as needed for users working with real applications.
* IBM
GCC COBOL supports IBM registers such as LENGTH OF, which is subtly different from the LENGTH intrinsic function. It also supports IBM STOP syntaxk, and allows some IBM keywords that have no effect on execution.
* MicroFocus
GCC COBOL supports LEVEL 78 constants and the CDF "$" syntax (for example, $IF) for conditional compilation.
If you encounter syntax that would make your conversion project easier, please get in touch. Write to us at info@cobolworx.com, or file a feature request with GCC Bugzilla.
Downloads
-
For source code, see GCC, the GNU Compiler Collection
-
Binary packages for Ubuntu Linux on x86_64 are available at gitlab.cobolworx.com. These are based on the main development branch, and are produced after automated CI/CD testing.
COBOLworx makes other binary packages available on request. Work is ongoing to ensure portability to other operating systems and machine architectures.
The Developers
The primary development team:
Marty Heyman is the team leader. He is the subject matter expert for COBOL and its uses, and is the orchestrator of our business plans.
James K. Lowden and Robert Dubner are the official GCC COBOL maintainers, as documented in the GCC MAINTAINERS file.
James K. Lowden is responsible for the COBOL parser. COBOL was originally created around 1958, before computer science had developed things like Backnus-Naur Form. It's a language loved more by users than parsers.
Robert Dubner is responsible for code generation. Code generation is also an "interesting" project, mainly because so few people have occasion to generate GIMPLE that there is little documentation for it, and less guidance. Mr. Dubner suspects he is the latest in a line of front end developers forced to reverse engineer what came before in order to do it at all.