gtpc3m0v | Concepts and Structures |
The entry control block, usually called the ECB, is the cornerstone of the application program reentrant structure in the TPF system. Use of the ECB allows one program to service multiple Entries because an ECB is private to an Entry. Within the ECB, there are work areas that are ordinarily an integral part of a non-reentrant program. Since reentrancy is a basic attribute of a TPF application program, the ECB is the facility provided in support of reentrancy.
The ECB consists of main storage blocks and is the link between the TPF system and the application, as well as between the other program segments (ECB-controlled programs) within the application package. That is, portions of the ECB are defined as an application interface (API).
See Figure 19 for a diagram of the ECB.
The ECB is 12KB long and is referred to in three 4KB page segments.
This is work space for use by application programs in any way it is required. The work areas are unformatted and of fixed sizes. However, if an application requires additional work area beyond what is provided by the ECB, it can be requested from the TPF system.
This area contains the addresses of file records and working storage blocks that the application program has requested from the TPF system.
This area contains status information, a register save area (used by the macro decoder), PSW save area, and other data required for the management of an Entry.
The space is for use by application programs in any way it is required.
It is used to hold data related to the Entry that might impact system availability if damaged by the application program, such as control information used in the management of the ECB and working storage blocks.
There is also a user-definable area in ECB page 2. The difference between this user-definable area and the one in ECB page 1 is that this one offers an additional level of protection because its storage key is not the same as the Entry's. Protection is achieved because the storage protection key must be explicitly changed in order to update this area.
The address of the ECB is in the ECB register, which is part of the interface when control is passed from the control program to the application. OPZERO initializes the ECB register when the ECB is created.
By convention of the TPF system, the ECB register is register 9.
An ECB is created for an Entry by OPZERO as described in Step 4b. OPZERO Creates and Initializes an ECB.