Changes Affecting Version 6.2

The following sections describe changes that can affect programs originally written with ACUCOBOL-GT Version 6.2.

UNIX: New Default Installation Directory

On UNIX systems, the ACUCOBOL-GT development system (compiler, runtime, utilities, etc.) has a new default directory location. The new location is: /opt/acucorp/720. This change has been made to conform with the Version 2.3 Filesystem Hierarchy Standard (FHS). Installing into the FHS standard location provides consistency and improves system integration. For more information about the FHS standard, please visit www.pathname.com/fhs/pub/fhs-2.3.html.

Initialization of External Data Items

Versions of ACUCOBOL-GT prior to Version 7.0 had the behavior of initializing external data items to LOW-VALUES, even when the rest of Working-Storage was initialized to spaces. Beginning with Version 7.0, all Working-Storage data items are initialized to spaces or the value specified with the -Dv compile option. This includes external data items.

To maintain compatibility with programs that rely on the old behavior, you can compile for semantic compatibility with Version 6.2 or earlier. Use the -C## compile option to do this (for example, -C62 for Version 6.2 compatibility). When you compile for compatibility with Version 6.2 or earlier, external data items are initialized to null bytes, regardless of how the rest of Working-Storage is initialized.

C Functions

Starting with Version 7.0, ACUCOBOL-GT has added significant new features to the C interface, allowing you greater flexibility for calling COBOL programs from C and C++.

For existing programs, this means:

  • The cobol() and cobol_no_stop() functions are still supported but have been deprecated. The new function, acu_cobol(), extends the options available in the C interface.
  • Information on the deprecated cobol() and cobol_no_stop() functions is not documented in Version 7.0. See Appendix F in previous versions of the ACUCOBOL-GT documentation set for this information.

Compiler Changes

Two compilation switches provide compatibility with Version 6.2:

-C62    Causes the compiler to generate code according to the rules used by Version 6.2.
-Z62 Creates object code that can be run with a Version 6.2 runtime.

Runtime Changes

  • The runtime now automatically corrects most reference modification range errors. It applies the following rules:
    1. A start reference less than 1 is treated as 1. For example, var(0:3) is treated as var(1:3).
    2. A length reference less than 0 is treated as 0. Moving a zero-byte item is equivalent to moving spaces to the destination item. A zero-byte destination is not affected by the move. In a STRING statement, a length of zero for a string source is treated as 1, not 0.
    3. A start plus length reference that is past the end of the item is treated as meaning to the end of the item. For example, if the var is a PIC X(5) item, var(4:23) is treated as var(4:2).

    The WARNINGS runtime configuration variable provides some control over how reference modification range errors are handled. See its entry in Appendix H.

  • The behavior of the character-based tree view control has changed. In previous versions, the MSG-TV-SELCHANGE message was not sent if the COBOL program deleted an item. Nor was it sent when the COBOL program first ACCEPTed a tree view control. Beginning with Version 7.0, the MSG-TV-SELCHANGE message is now sent in both cases.
  • Beginning with Version 7.0, when the runtime reduces the size of a window to fit the screen, it includes any fractional lines and columns that fit, provided the COBOL program attempted to create a window with fractional lines and columns. For example, if the program creates a 70.0 line window, but only a 66.4 line window fits on the display, the runtime detects that no fractional lines were attempted, and truncates the number of lines to 66.0. However, if you attempt to create a 70.1 line window, the runtime recognizes the fractional measurement and displays a 66.4 line window. In prior versions, the runtime always reduced the size of the window to a whole number. To preserve the old behavior, set the configuration variable V62_MAX_WINDOW to 1 (on, true, yes).
  • Beginning with Version 7.0, the Web runtime uses ANSI_FIXED_FONT as the standard font. Because some systems may depend on the old font, this change is configurable. To use the font standard from Versions 6.2 and earlier (SYSTEM_FIXED_FONT), adjust the setting of the configuration variable STD_FIXED_FONT, described in Appendix H.