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

80 Chapter3
Growth Solution
Compatibility Considerations for COBOL and C
COBOL/iX
Backward compatibility for COBOL II/iX executable programs (NMPRGs) and executable
libraries (NMXLs) should not be a problem. If your COBOL code generates calls to any of the
new Millicode routines, those routines will be copied from the Millicode library and bound
into your program or XL. The absence of the latest Millicode library on the target machine
is not a problem, because the Millicode library is a relocatable library and is not accessed
at run time.
However, if you compile a COBOL II/iX program on an MPE/iX 6.5 system and try to link it
on a pre-6.5 system, you may have unresolved externals because of calls to the new
Millicode routines. These unresolved externals might be reported at link time, but it is
possible that the problem would not show up until load time, with unrelated errors
reported by the RUN command. The recommended procedure is to link on the 6.5 system,
where the latest Millicode library is available.
C/iX
As with COBOL II/iX, the C/iX compiler may take advantage of the new Millicode routines,
even in programs that don’t use the new “long long” 64-bit integer data type. If you compile
and link on a 6.5 system, you will probably not have difficulty moving a C/iX executable
program (NMPRG) to a pre-6.5 system. But if you compile on a 6.5 system and try to link
on a pre-6.5 system, you may encounter unresolved externals or unrelated load-time
errors, especially if you use 64-bit integers.
There are additional considerations to be aware of if you use the 64-bit integer
functionality of the C/iX Library. If you do so, and if you want to move your code to a
pre-6.5 system, you need to be sure to link with LIBC.LIB.SYS, the relocatable library
that contains the entire C/iX Library. If you link with LIBCINIT.LIB.SYS or
LIBCSHR.LIB.SYS instead, and then move your program to a pre-6.5 system, there are two
problems you are likely to encounter.
First, if you have called strtoll() or strtoull(), you will have unresolved externals,
because these functions do not exist in the C/iX Library in XL.PUB.SYS on pre-6.5 systems.
Second, you will experience strange behavior if you use 64-bit integers with the printf()
and scanf() families of functions. The pre-6.5 versions of these functions do not recognize
the ll modifier for long long integers and will produce incorrect results.
Not Supported, but Might Work
In summary, it is not supported to compile code on any release of MPE/iX and then move it
to an earlier release, even though it often works.
If you try to move code from an MPE/iX 6.5 system to a pre-6.5 system, if it doesn’t work,
the following are the most likely symptoms.
You get unresolved externals for $$mul2U, $$mulo2U, $$mul12U, $$div2I,
$$div2U, $$rem2I, or $$rem2U. If the unresolved externals go undetected, you get
strange, unrelated errors at load time. This could happen with COBOL II/iX or C/iX.
You get unresolved externals for strtoll() or strtoull(). This could happen if you
use these new C/iX Library functions for converting 64-bit integers.