Application programming on z/OS
Previous topic | Next topic | Contents | Glossary | Contact z/OS | PDF


How programs are prepared to run on z/OS

Application programming on z/OS

The process steps for translating a source program into an executable load module, and executing the load module, include compiling and link-editing, although there might be a third step to pre-process the source prior to compiling it. The pre-processing step would be required if your source program issues CICS® command language calls or SQL calls. The output of the pre-processing step is then fed into the compile step.

The purpose of the compile step is to validate and translate source code into relocatable machine language, in the form of object code. Although the object code is machine language, it is not yet executable. It must be processed by a linkage editor, binder, or loader before it can be executed.

The linkage editor, binder, and loader take as input object code and other load modules, and then produce an executable load module and, in the case of the loader, execute it. This process resolves any unresolved references within the object code and ensures that everything that is required for this program to execute is included within the final load module. The load module is now ready for execution.

To execute a load module, it must be loaded into central storage. The binder or program manager service loads the module into storage and then transfers control to it to begin execution. Part of transferring control to the module is to supply it with the address of the start of the program in storage. Because the program's instructions and data are addressed using a base address and a displacement from the base, this starting address gives addressability to the instructions and data within the limits of the range of displacement1.

1 The maximum displacement for each base register is 4096 (4K). Any program bigger than 4K must have more than one base register in order to have addressability

Go to the previous page   |   Go to the next page




Copyright IBM Corporation 1990, 2010