As of Natural Version 5, Natural generated programs (GPs) are portable across UNIX, OpenVMS and Windows platforms.
This document covers the following topics:
As of Natural Version 5, a source which was cataloged on any Natural-supported UNIX, OpenVMS and Windows platform is executable with all of these Open Systems platforms without recompilation. This feature simplifies the deployment of applications across Open Systems platforms.
Natural applications generated with Natural Version 4 or Natural Version 3 can be executed with Natural Version 5 or above without cataloging the applications again (upward compatibility). In this case, the portable GP functionality is not available. To make use of the portable GP and other improvements, cataloging with Natural Version 5 or above is required.
Command processor GPs are not portable. The portable GP feature is not available for mainframe platforms. This means that Natural GPs which are generated on mainframe computers are not executable on UNIX, OpenVMS and Windows platforms without recompilation of the application and vice versa.
As of Natural Version 5, Natural acts as follows: Depending on which UNIX, OpenVMS or Windows platform it is running, Natural will consider the byte order in which multi-byte numbers are stored in the GP. The two byte order modes are called "Little Endian" and "Big Endian".
"Little Endian" means that the low-order byte of the number is stored in memory at the lowest address, and the high-order byte at the highest address (the little end comes first).
"Big Endian" means that the high-order byte of the number is stored in memory at the lowest address, and the low-order byte at the highest address (the big end comes first).
The UNIX, OpenVMS and Windows platforms use both endian modes: Intel processors and AXP computers have "Little Endian" byte order, other processors such as HP-UX, Sun Solaris, or RS6000 use "Big Endian" mode.
Natural converts a portable GP automatically into the endian mode of the execution platform, if necessary. This endian conversion is not performed if the GP has been generated in the endian mode of the platform.
In order to increase execution performance of portable GPs, the profile
parameter ENDIAN
has been
introduced. ENDIAN
determines the endian mode in which a
GP is generated during compilation:
DEFAULT |
The endian mode of the machine on which the GP is generated. |
BIG |
Big endian mode (high order byte first). |
LITTLE |
Little endian mode (low order byte first). |
The values DEFAULT
, BIG
and
LITTLE
are alternatives whereby the default value is
DEFAULT
.
The ENDIAN
mode parameter may be set
as a profile parameter,
as a start-up parameter,
as a session parameter.
As of Natural Version 6.2, the file FILEDIR.SAG and
the error message files are platform independent. Hence, it is possible to
share common FUSER
system files among different Open Systems
platforms. For example, it is possible to copy sets of Natural libraries from
one Open Systems platform to another with operating system copy procedures.
However, it is not recommended to share FNAT
system files. For
more information about the portable FILEDIR.SAG, refer to
Portable Natural System Files in
the Operations documentation.