Enter/Back (program linkage)

z/TPF programs are invoked through one of the following enter macros or through one of the create macros, which are described in Create entries with create macros.
  • ENTNC — Enter with no return. The calling program does not expect a return of control.
  • ENTRC — Enter with return. The calling program expects to get control back. When a BACKC macro is encountered during Entry processing, BACKC returns control to the last program that issued an ENTRC.
  • ENTDC — Enter and drop previous programs. An ECB-controlled program is called and the Enter-Back macro control information that was saved is reinitialized to remove linkages to all previous programs.
  • SWISC TYPE=ENTER — Transfer the ECB to another I-stream engine and drop previous programs. This macro performs the function of ENTDC while transferring the ECB to another I-stream engine.

When a C language program issues external function calls, a stub is processed that provides the bridge for a C language program into the z/TPF enter/back services.

z/TPF loaders manages program loading and associating program names with system storage.
  • The MakeTPF solution uses program allocation information specified during system generation to create the online program attribute table
  • The general file loader is a two-part process: offline load and online load.

    The offline loader builds a loader general file and the online loader (ACPL) uses the loader general file to place the online programs in their designated locations. The online loader is the mechanism used by the z/TPF system to build the production z/TPF environment.

The system service routine responsible for handling Enter requests:
  • Knows that the program is already in main storage, or
  • Detects that the program is being accessed from file storage because of a previous reference.

If the program is already in main storage, the z/TPF system also knows where in main storage the program is located. If a program must be accessed from DASD storage, the z/TPF system obtains the necessary space in main storage to hold the program. This (main) storage management is transparent to the application program.

In summary, the system loader represents the procedure that catalogs the application programs to their system residence. The mechanism that moves programs from file storage to main storage is system code that is reached as a result of an Enter macro request. BACKC implies that the entered program is returning control to a calling program. A distinction between Enter and Entry is useful:
Entry
A process (possibly consisting of many programs) for which a separate ECB was created. An Entry is usually created as a result of an input message. The system can also create Entries that are not the direct result of an input message.
Enter
The act, through the use of an Enter macro request, of invoking (transferring control to) another program. The entered (called) program will use the same ECB as the entering (calling) program. If the called program must be moved from file storage to main storage, the z/TPF system obtains the storage and brings about the movement. Both the entering (calling) and entered (called) programs are part of the same Entry.