Communicator 3000 MPE/iX Release 6.5 (Non-Platform Software Release C.65.00)
> Chapter 3 Growth SolutionCompatibility Considerations for COBOL and C |
||||||||||||||||
|
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.
Forward Compatibility Not a ProblemHewlett-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 GuaranteedIn 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. COBOL/iXBackward 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/iXAs 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 WorkIn 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.
|