Communicator e3000 MPE/iX Release 6.5 (Non-Platform Software Release C.65.00 (30216-90291)

Chapter 3 79
Growth Solution
Compatibility Considerations for COBOL and C
Compatibility Considerations for COBOL and C
by Walter Murray
Support Technology Lab
This article discusses compatibility concerns relating to HP COBOL II/iX and HP C/iX on
MPE/iX 6.5. These concerns are the result of enhancements to provide better language
support for 64-bit integers.
The project to improve support for 64-bit integers involved changes to four products.
The C/iX compiler was enhanced to provide full support for “long long” integers. Details
can be found elsewhere in this Communicator.
Seven new routines were added to the Millicode libraries, MILLI.LIB.SYS and
/lib/libmilli.a, to perform highly optimized arithmetic operations on 64-bit
integers. The entry points for these new routines are $$mul2U, $$mulo2U, $$mul12U,
$$div2I, $$div2U, $$rem2I, and $$rem2U.
The C/iX Library was enhanced with two new functions to convert from strings to 64-bit
integers. These are strtoll() and strtoull(). In addition, the printf() and
scanf() families of functions were enhanced to recognize an optional ll (ell ell) modifier
to specify that the corresponding argument is a long long integer.
The COBOL II/iX compiler was updated to generate code that takes advantage of the
new 64-bit Millicode routines.
Forward Compatibility Not a Problem
Hewlett-Packard strives to maintain forward compatibility from one release of MPE to the
next. MPE/iX 6.5 is no exception. Applications developed on previous releases of MPE/iX
should continue to run without needing to be recompiled or relinked. Furthermore,
whenever an application is recompiled on MPE/iX 6.5, it should not be necessary to make
any changes to the source code or to the procedures for compiling, linking, and running.
Backward Compatibility Not Guaranteed
In general, HP does not guarantee that an application can be developed on one release of
MPE/iX and then executed on an earlier release without change. Although code that is
compiled using the latest release can often be moved successfully to a system on an older
release, doing so is generally not supported.
As is explained below, moving executable programs and executable libraries from MPE/iX
6.5 to a pre-6.5 system probably works in many cases. However, there are situations where
special procedures might be required if you want to avoid having to recompile or relink on
the earlier system.
It isn’t possible to enumerate all of the situations in which problems might be encountered
when moving backward to a pre-6.5 system. If you encounter difficulties in doing so, you
may be able to find workarounds. Remember, though, that in some situations it may be
necessary to recompile in order to move an application from MPE/iX 6.5 to an earlier
system.