What's new in COBOL for Linux on x86 1.2

COBOL for Linux® on x86 1.2 adds support for the following new features. If you are migrating COBOL source programs from COBOL for Linux on x86 1.1 or another COBOL compiler to COBOL for Linux on x86 1.2, see the Migration Guide for differences between compilers.

64-bit application development support

COBOL for Linux on x86 1.2 provides support for creating 64-bit COBOL applications. This provides you access to a larger address space for code and application data, more efficient use of memory layout, and improved performance.

You can control whether 64-bit or 32-bit COBOL programs are created through use of the ADDR compiler option. By default, the compiler will create 64-bit applications. To learn more about the ADDR compiler option, see ADDR.

In 64-bit mode, storage allocation for data items that contain addresses or indexes (POINTER, FUNCTION-POINTER, PROCEDURE- POINTER, and INDEX) is increased to 8 bytes, affecting data items that have any of these usages.

Additional benefits include the ability to link COBOL applications with 64-bit C/C++ and other compiled language applications, and to interoperate with 64-bit Java™ applications through JNI. COBOL programs that make use of IBM® Db2® might see improved performance as the program no longer needs to spend cycles transitioning data between a 64-bit Db2 server and a 32-bit Db2 client.

The debugger included with COBOL for Linux on x86 1.2 provides the capability to debug 64-bit COBOL applications.

Incremental build support

Incremental build support is provided through the -M compiler option. When the -M compiler option is specified, the compiler will generate dependency information that can be used in a makefile. GNUmake makes use of the dependency information and will automatically recompile a COBOL program if its source or any of the copybooks it uses are modified. This may help improve developer productivity by allowing iterative, incremental builds, while also ensuring that programs are always built with the latest version of any copybooks that are used.

To learn more about the -M compiler option, see -M.

MongoDB as a VSAM data store

Support for MongoDB as a VSAM data store is provided by specifying a file system type of MONGO in COBOL applications.

For more information about MongoDB, see Using MongoDB files.

SLES 15 support

SLES 15 support is available for building and deploying 64-bit COBOL applications. SLES 15 only supports building and deploying of 64-bit COBOL applications. For building and deploying 32-bit COBOL applications, use either RHEL 8 or 9 or Ubuntu 20.04 or 22.04, as these platforms provide the ability to build and deploy both 32-bit and 64-bit COBOL applications.

To learn the system requirements of COBOL for Linux on x86 1.2, see System prerequisites.

Option changes

With PTF for APAR PH58656 installed, ARITH(FULL) is added. ARITH(FULL) is the same as ARITH(EXTEND) except for the number of decimal digits preserved in intermediate results. For more details about the ARITH option, see ARITH.