contents.gifindex.gifprev1.gifnext1.gif

Changes Affecting Version 3.2

Version 4.0 contains two new compilation switches for compatibility with Version 3.2:

-C32 --Causes the compiler to generate code according to the rules used by Version 3.2.

-Z32 --Creates object code that can be run with a Version 3.2 runtime.

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

* Under 32-bit Windows, the user name returned in ACCEPT FROM SYSTEM-INFO is now retrieved from the system instead of from the USER environment setting. The name retrieved is the user's login name. This change could affect installed programs in that a user's name may appear differently than it did with earlier runtimes. The runtime does not provide a way to override this change, because doing so would present a security hole under Windows NT.

* The default compile output file has been changed from "cbl.out" to "{source-name}.acu". This could affect the behavior of scripts used to compile programs. Also, if no CODE-SUFFIX is specified, the runtime tries a suffix of ".acu" before trying a blank suffix. This could affect programs if you happen to use a blank suffix for objects and have files named with the ".acu" extension in the same directory as your objects. To work around this, simple set CODE-SUFFIX explicitly in your configuration file. To specify a blank extension, simply add "CODE-SUFFIX" with no value.

* AUTO termination on a graphical screen now acts as if the "Tab" key had been pressed.

Suppose a user is interacting with a screen that has an entry field followed by a radio button group. Normally, when the user tabs to the radio button group, control passes to the "group leader" (that is, the button that is selected, or the first button in the group, if none is selected). Prior to Version 4.0, if the entry field were defined with the AUTO style, then when the field was full, control passed to the very next item in the Screen Section. This might be a radio button that was not the "group leader."

The Version 4.0 runtime has been enhanced to treat this AUTO termination case as if the "Tab" key had been pressed, so that control passes to the "group leader" when the entry field becomes full.

If the program is compiled with the "-C##" option, where "##" is a number less than 40 (such as "-C32" or "-C31"), this enhancement is disabled, and the behavior reverts to that of earlier versions.

* Starting with Version 4.0, the compiler uses a new rule when moving LOW-VALUES or HIGH-VALUES to a numeric item.

Under standard COBOL, a MOVE of LOW-VALUES or HIGH-VALUES to a numeric item has undefined effects. Prior to Version 3.0, ACUCOBOL would treat these items as if they had legal numeric values, convert them accordingly, and move the result. This often results in a meaningless value, but can be useful for some numeric data items.

USAGE DISPLAY types, for example, would end up with LOW-VALUES in their storage. Non-DISPLAY types ended up with odd values. Some other COBOL systems would produce a value of zero in binary numeric items when LOW-VALUES were moved to them.

In order to improve compatibility with these systems, ACUCOBOL-GT was changed in Version 3.0 so that a MOVE of LOW-VALUES to a numeric item moved ZERO to that item. There were two concerns with this: (a) the compiler did not do this in every case, and (b) this changed the behavior of some programs that were functioning under prior versions of the runtime.

Starting with Version 4.0, the compiler uses the following rule when moving LOW-VALUES or HIGH-VALUES to a numeric item:

When the constant LOW-VALUES or HIGH-VALUES is the source of a MOVE statement whose destination is numeric, the move is treated as if the destination were defined as class alphanumeric. This results in the memory occupied by the numeric item being filled with LOW/HIGH-VALUES.

This rule tends to produce the best results of both the pre-3.0 and post-3.0 behavior--the useful cases work out the same. Also, this rule expresses what most programmers believe should happen.

This new rule is used only for programs compiled for 4.0 semantics (this is the default). If you use the "-C##" or "-Z##" option to compile for earlier semantics, the compiler does not use this rule, and the runtime adjusts to use the semantics that were in place for version "##". For example, if you compile with "-C24", then the runtime will use the pre-3.0 semantics for the meaning of MOVE LOW-VALUES to a numeric item.