Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and Migration
B.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX Behavior Differences
CIT3 gives improved compatibility between Compaq COBOL and Compaq
COBOL for OpenVMS VAX. Even with CIT3, however, there are differences:
Invalid decimal data
In Compaq COBOL, invalid decimal data detection takes place before any
possible conversion to CIT3. CIT3 operations on data items containing
invalid decimal data will get results possibly different from those with
Compaq COBOL for OpenVMS VAX.
Floating-point data items
In Compaq COBOL, expressions involving COMP-1 or COMP-2 data
items are converted to G_floating (on OpenVMS Alpha) or T_floating
before conversion to CIT3. CIT3 operations involving D_floating (on
OpenVMS Alpha) data items, in particular, will get different results from
Compaq COBOL for OpenVMS VAX.
Undefined results
If an abnormal condition arises during a CIT3 operation, for example,
INTEXPOVE (intermediate exponent overflow), and the program
continues, and it is not an arithmetic statement with an ON SIZE
ERROR clause, then the values that are stored in destination items will
be undefined. Compaq COBOL and Compaq COBOL for OpenVMS VAX
are highly likely to get different undefined results in such cases.
STANDARD dependency
The Compaq COBOL for OpenVMS VAX /STANDARD qualifier has
an effect on when arithmetic expression analysis switches to one of
the CIT forms. When you specify /STANDARD=V3 (-std v3), CIT
is used when more than 18 digit intermediate results are needed.
With /STANDARD=85 (-std 85), CIT is used when more than 31 digit
intermediate results are needed. The Compaq COBOL implementation
on Alpha is compatible with Compaq COBOL for OpenVMS VAX with
/STANDARD=85.
Special contexts
The CIT3 implementation does not provide support equivalent to the
Compaq COBOL for OpenVMS VAX behavior for intrinsic functions
MEDIAN, NUMVAL, and NUMVAL-C.
See Section 2.7.1 in this manual, and the Compaq COBOL Reference
Manual for more information on the /MATH_INTERMEDIATE and
/ARITHMETIC qualifiers.
B.5 Compaq COBOL Differences Across Operating Systems
Certain Compaq COBOL features have unique behaviors, depending upon which
of these operating systems you are using, and sometimes these differences
differ from release to release. You should refer to the Release Notes to get the
most recent information about these differences. The next few sections describe
distinct differences in feature implementation and behavior.
B–24 Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and Migration