Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Setting Up z/OS MVS Programming: Extended Addressability Guide SA23-1394-00 |
|
To make its services available to other address spaces through a PC instruction, the service provider sets up the authorization structures and the linkage and entry tables. To request that the system reserve an authorization index (AX)
for the service provider's address space, or an extended authorization
index (EAX) for a PC routine, the service provider issues the AXRES
macro. The AX or EAX is reserved across the entire system. The home
address space at the time the AXRES macro is issued becomes the owner
of the AX or EAX:
See Extended authorization index (EAX), Types of access list entries and EAX-authority to an address space for more information about the EAX. To set the AX of the service provider's address space to the AX
value that MVS™ reserved, the
service provider issues the AXSET macro:
To request that the system reserve a non-system LX for later use,
the service provider issues the LXRES macro to reserve a 4-byte LX.
A non-system LX allows a service provider to connect to selected users.
The home address space at the time the LXRES macro is issued becomes
the owner of the LX:
To
request that the system provide a non-system extended LX value, issue
the following:
To
request that the LX be a reusable extended non-system LX value, issue
the following:
To define which PC routines will be available to user, the service provider must issue two macros, ETDEF and ETCRE. The ETDEF macro builds an entry table descriptor (ETD). Each ETD defines a PC routine. The ETCRE macro uses the ETDs as input to build an entry table. The entry table contains ETD entries for each of the PC routines that the service provider is making available to the user. The home address space at the time the service provider issues the ETCRE macro becomes the owner of the entry table. There are two ways the service provider can use the ETDEF macro:
Note: Instead of issuing ETDEF, the service provider has the option
to code the data areas that ETDEF builds. IBM® provides a mapping macro, IHAETD,
that maps the format 0 ETD. IBM recommends,
however, the use of the ETDEF macro.
The following figure shows how to use ETCRE and ETDEF to create an entry table that defines two stacking PC routines. This example works only when the PC routines are located in LPA or in the nucleus. Figure 1. Using ETDEF to statically define entry table
descriptors
In the previous example, the first ETDEF macro defines the beginning of the entry table definition. The second ETDEF macro defines a space switch PC routine named Service1.
This PC routine receives control in problem state, requires that
all input and output parameters be in key 8 storage, and can reference
date that is in key 8 storage only. This example of the ETDEF macro
shows how to define a stacking PC routine that decreases authority.
The third ETDEF macro defines a non-space switch PC routine named Service2.
This PC routine can reference input/output parameters in any key.
This example of the ETDEF macro shows how to define a stacking PC
routine that increases authority.
The last ETDEF macro defines the end of this entry table definition. When a PC routine is not in LPA and is not in the nucleus, the service provider will not know the location of the PC routine until it is loaded. Also, the service provider will not know the address of the PC routine's associated recovery routine (ARR) until it is loaded, and will not know the EAX value until the AXRES macro is issued. Therefore, the service provider must create at least part of the entry table definitions dynamically. The following figure shows how the service provider could create the entry table if the PC routine, Service1, and the ARR, ARR1, were loaded into private storage first. The figure shows code for a non-reentrant program. ETDEF TYPE=SET specifies a complete entry replacement. All options are either set or defaulted. Nothing is carried over from the TYPE=ENTRY declaration. Note that, in this example, the service provider uses the AX value, provided through the AXRES macro, as an EAX value. Figure 2. Using ETDEF to dynamically define entry table
descriptors
The preceding example of the ETDEF macro shows how to define a
stacking PC routine that uses an ARR and an EAX:
Once the linkage and entry tables have been created, the service
provider can construct the PC numbers that identify the PC routines.
A PC number is a fullword value formed by combining an LX and an EX.
The LXRES macro returns the LX in the format that's shown below.
This format allows the service provider to OR the LX with an EX to
form a PC number:
Shown below is an LX that is available only when the LX reuse facility
is enabled:
The LXRES macro returns the LX in the format that's shown below.
This format allows the service provider to OR the LX with an EX to
form a PC number:
To make the PC numbers accessible, the service provider can save
the address of its SERVBLK by using name/token callable services:
|
Copyright IBM Corporation 1990, 2014
|