Changes Affecting Version 1.4

The following sections describe changes that can affect programs compiled with the Version 1.4 ACUCOBOL-85 compiler. These are the same changes that occur when you move from Version 1.4 to Version 1.5.

Compiler Changes

The following changes can affect programs when they are re-compiled. Note that all of these changes can be suppressed by the -C4 compile-time option, which causes the compiler to use Version 1.4 semantics. Also note, that the -Z4 compile-time option (which produces 1.4 compatible object files) will also inhibit these changes. Note that there are several important changes, especially if you are using VAX COBOL compatibility mode. You should use -C4 until you can evaluate the extent to which these changes affect your programs.

  • Note: Under Version 1.4, USAGE BINARY data items are treated as identical to USAGE COMP-1 data items. Since Version 2.1, USAGE BINARY items are treated as defined by the ANSI standard. This results in data items that are different except for data items described as PIC S9, S9(2), S9(3) or S9(4). If you have any USAGE BINARY data items in files, you will need to specify "-C4" to maintain compatibility with your existing files until you can change your programs.
  • Note: The internal format of COMPUTATIONAL data items is different under the following circumstances:
    1. You are using VAX COBOL compatibility mode; or
    2. You use the -Zb or -Db compile-time options.

    Under previous versions, a data item that fit one of these conditions is stored as a COMP-1 data item if it is small enough (PIC S9(4) or smaller), otherwise, it is stored as a COMP-2 data item. Since Version 2.1, these items are stored as BINARY. This is the same as COMP-1 for the small data items, but is different for the larger ones. If either of these cases applies to your programs, and you store COMPUTATIONAL data items in files, then you should use -C4 to maintain compatibility with your files until you can modify your programs.

  • In previous versions of ACUCOBOL-85, COMP-3 data items are always treated as signed. They are also rounded up to an odd number of digits. Beginning with Version 2.0, they act as described by their picture clauses.
  • In Version 1.4, COMP-6 data items always have an even number of digits. Since Version 2.1, they have the number of digits specified in their picture clauses.
  • Since the release of Version 2.1, specifying CONVERT on a DISPLAY of a numeric edited data item causes that item to have its leading spaces stripped and causes the item to be justified according to the rules applied to numeric data items. Under Version 1.4, output conversion of numeric edited items has no effect.
  • In Version 1.4, specifying the CONTROL KEY phrase or the ON EXCEPTION Key-Name phrase for an ACCEPT statement implies automatic termination of a field when that field is filled. Since the release of Version 2.1, this behavior is specified by the AUTO phrase. Because of the nature of the ACCEPT rules, this change does not affect programs using RM/COBOL compatibility mode.
  • Versions of ACUCOBOL-85 prior to 2.1 do not support file errors 14 or 24 for relative files when the relative key data item is too small to hold the relative record number. Version 2.1 and all later versions return the appropriate error in this case.
  • Since Version 2.1, assigning a file to the device name PRINTER without explicitly assigning an external file name causes the file to be assigned to "PRINTER" when you are using VAX COBOL compatibility mode. Under previous versions, the file is assigned to the same name as its internal file name.
  • In Version 1.4, the SYNCHRONIZED clause has no effect. Since Version 2.1, data item synchronization occurs.
  • The rules for the meaning of the ON EXCEPTION phrase of the ACCEPT statement have changed. For versions prior to Version 2.0, this phrase catches numeric conversion errors. If the Key-Name option is used, it also catches exception keys. Since Version 2.0, it always catches exception keys and does not catch numeric conversion errors (these errors are handled automatically by the terminal manager). Specifying -C4 or -Ve2 retains the original meaning of this phrase. Programs using RM/COBOL compatibility mode are unlikely to be affected by this change.
  • Since Version 2.0, closing a window moves the cursor to the position it occupied when that window was created. Before Version 2.0, the cursor moved to the home position of the restored window.
  • Many new reserved words have been added since Version 2.0. Most of these can be treated as user-defined words through use of the new -Rs and -Ri compile-time options. A few new words not covered by these options have also been added. If they conflict with your current programs, you can individually treat them as user-defined words with the -Rw option.
  • Several compile-time options were renamed in Version 2.0. The original names are still supported, however, so this change does not affect existing programs or compile scripts, except for the -Ca option described earlier.

Runtime Changes

The following changes occur when the latest runtime is installed.

  • The default meaning of the Tab key has changed. Under Version 1.4, the Tab key is an exception key that has a key value of 9. Beginning with Version 2.0, the Tab key is a termination key with a key value of 9. The only difference is that under the previous version, the Tab key is allowed only when exception keys are allowed and it causes the ON EXCEPTION phrase to execute. If you depend on this behavior, you can add the following line to your configuration file:
         KEYSTROKE Exception=9 ^I

    This change was made so that the Tab key could function as a next field key when you are using the Screen Section.

  • Several other keys were redefined in Version 2.0 for use with the Screen Section. These changes do not affect existing programs, however, because the new defaults have the same effects as the old ones when used with field-level ACCEPT statements.
  • The maximum number of files that can be opened by the runtime was reduced from 64 to 32 in Version 2.0. This was done to save memory. If you need more than 32 files, you can set the maximum to any value you want (up to 255) with the MAX_LOCKSconfiguration option. See Appendix H for details.
  • A subtle change has been made in the processing of the user's environment. In previous versions, an entry in the user's environment always takes precedence over an entry in the runtime's local environment. Beginning with Version 2.0, an entry in the user's environment takes precedence at the time the local environment is initially created. This change allows the SET ENVIRONMENT verb to have an affect on an entry initially defined in the user's environment.
  • Since Version 2.1 the cursor does not leave the field when the field is filled. Instead, it stays in the last character position and inhibits further data entry. This difference is cosmetic, but if you prefer the method used by previous versions, you can add the following line to your configuration file:
    KEYBOARD  Cursor-Past-End=Yes