The following section details changes that can affect programs originally written for the Version 2.1 ACUCOBOL-85 compiler.
For machines using MS-DOS, ACUCOBOL-GT Version 3.0 requires MS-DOS version 3.0 or later. ACUCOBOL-85 Version 2.1 required only MS-DOS version 2.0.
Beginning with Version 3.0, ACUCOBOL-GT fully supports 64-bit machines without restriction. At the current time, the only machine that fits this classification is the DEC Alpha machine running OSF (Open/VMS also runs on the Alpha machine, but it runs in 32-bit mode). Version 2.1 of ACUCOBOL-85 also runs on 64-bit machines, but it contains some restrictions.
In Version 2.1, the following items are restricted:
Beginning with Version 3.0, these restrictions do not apply. We made certain changes to the rules of ACUCOBOL-85, beginning with Version 2.3. These changes affect only a few existing COBOL programs, but they have the potential of causing a working program to stop working. Because of this, there is a method available to inhibit these changes. See the -Dw option in Data Storage Options.
The specific changes are:
This is the change that is most likely to affect existing programs. You can be affected if you have POINTER data items as part of a group item, since the group item's size will change. If you have this case, then either allow the size of the group to change and adjust any external references or redefinitions of it, or use the option described below to keep POINTER items in 4 bytes.
For related topics, see
As discussed in the previous section, the special register RETURN-CODE has changed. In versions of ACUCOBOL-85 prior to 2.3, RETURN-CODE was implicitly defined as:
77 RETURN-CODE PIC S9(9) COMP-5, EXTERNAL. In Version 2.3 and later, it is defined as: 77 RETURN-CODE SIGNED-LONG, EXTERNAL.
This change should have no noticeable effect on existing code, but it allows RETURN-CODE to be used sensibly on 64-bit machines. This change is inhibited if you compile for compatibility with a prior version of ACUCOBOL-85. For example, if you use -C21 to maintain source compatibility with Version 2.1, then this change does not take place.
There is also a special register that redefines RETURN-CODE called RETURN-UNSIGNED. Its definition is:
77 RETURN-UNSIGNED REDEFINES RETURN-CODE UNSIGNED-LONG, EXTERNAL.
You should use RETURN-UNSIGNED when handling pointer or unsigned long data types that are returned from an external routine. If you use RETURN-CODE in these cases, you can get errors if the value is large enough to set the high-order bit of RETURN-CODE. The problem is that these values are negative when interpreted as signed values, therefore COBOL will remove the sign if you move them to an unsigned destination.
The RETURN-UNSIGNED special register is not defined if you compile for compatibility with prior versions of ACUCOBOL-85.
For machines using MS-DOS, ACUCOBOL-GT Version 3.1 and later versions do not run under standard 16-bit DOS but do support 32-bit Extended DOS. Version 3.0 requires MS-DOS version 3.0 or later. ACUCOBOL-85 Version 2.1 required only MS-DOS version 2.0.