This section discusses some key considerations for porting applications to Linux on the mainframe. Before choosing an application as a candidate for porting, you need to be aware of the application's dependencies on other software, decide which mainframe architecture to target (31-bit or 64-bit), and determine whether you want to provide support for different distribution levels and distributions.
18.2.1 Third-party dependencies
Whether porting an application is feasible also depends on the context in which the application is to run. The application might depend on supporting software. A port would then imply also porting that software. If the required supporting software is a proprietary application or middleware of a third party, the port becomes dependent on the willingness of that third party to port its software. StoreCompany, for example, required DB2 Connect (see 19.3, "Connectors to back-end systems") for its online sales project.
18.2.2 Distribution dependencies
Companies or software vendors might want to build a distribution-neutral application. The effort for ensuring support by different distributions depends on how strongly the code depends on specifics of a distribution and on how different the distributions are. The additional effort is likely to be restricted to tests for each distribution where the application is intended to run.
18.2.3 31-bit versus 64-bit
Linux on the mainframe applications can be for the 31-bit or for the 64-bit architecture. In keeping with the mainframe principles, zSeries architecture supports all software that ran on its 31-bit predecessor. Applications that are built for 31-bit run on both zSeries and S/390 machines.
If an application requires any new capabilities of the zSeries architecture (for example, 64-bit addressing), it can be built only for 64-bit distributions. It is possible to run 31-bit applications on a 64-bit distribution. However, a 31-bit application cannot use 64-bit shared libraries. All libraries required by the application must be provided in 31-bit format.
18.2.4 Architecture-dependent code
If application code makes implicit or explicit assumptions about the underlying hardware or software platform, the code will probably have to be adapted before it can run on Linux on the mainframe. This section points to some sources where interfaces are documented.
How Linux on the mainframe differs from Linux on other platforms is described in the ELF Application Binary Interface Supplement available on: http://www10.software.ibm.com/developerworks/opensource/linux390/index.shtml.
zSeries assembler code for Linux follows the syntax conventions of the GNU assembler but uses zSeries (S/390) machine code. For reference information on zSeries machine code, see z/Architecture Principles of Operation.
Because zSeries is a big endian system application code that processes byte-oriented data that originated on a little endian system may need to be adapted.
For details, refer to
The effort for handling architecture-dependent code depends on how the application is structured. A well-designed application might have such code in only a few specific modules. In this case, the code sections to be adapted are isolated and easily located.
The architectural differences between the mainframe and other platforms are documented. If it is required, the documentation can be found and accessed on the Internet.