z/OS MVS Programming: Extended Addressability Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Procedures for the accessing address space

z/OS MVS Programming: Extended Addressability Guide
SA23-1394-00

The procedures for the program in the accessing address space include writing a stacking PC routine (Step 1), establishing the environment in which it can be called (Steps 2 through 6), and invoking the PC routine (Step 7). The procedures are as follows:

  1. Write a PC routine that will run in the accessing address space.

    The PC routine contains the ALESERV ADD request for an address space and any code that manipulates data in the target address space. (See Step 7.)

  2. Issue the AXRES macro to reserve an AX to be placed in the entry table descriptor (ETD) as the EAX value of the PC routine.
  3. Place the AX in a common area so that a program in the target address space can obtain it and set its AT accordingly.
  4. Issue the ETDEF macro to build the PC routine's ETD.

    On the EAX parameter, code the address of the AX value that is to be the EAX of the PC routine.

  5. Establish the cross memory structures in the accessing address space so that the stacking PC routine can be called.
    • Issue the ETCRE macro to build the entry table.
    • Issue the LXRES macro to reserve a linkage index (LX) in the linkage table.
    • Issue the ETCON macro to connect the entry table to the linkage table entry.
  6. Wait (using the WAIT macro) for the program in the target address space to set its authority table entry.

    The program in the target address space will accept the EAX value and set the authority table accordingly. In this way, the target address space "gives permission" to the accessing program to reference data in the address space.

  7. Invoke the stacking PC routine to gain EAX-authorization.
    While the PC routine is running, the caller has the EAX value that the EAX parameter on ETDEF defined. The PC routine can perform the following actions:
    • Issue the ALESERV ADD macro to add an entry for the target address space to the access list.
    • Manipulate data in the target address space, if needed.

      If the routine uses the ALET that ALESERV returns in accessing or manipulating data in the target address space, the PC routine must be in AR mode (either through the SAC instruction or through the AR parameter on the ETDEF macro that defined the PC routine).

    • Use the PR instruction to return to the caller and restore the EAX value that existed before the PC routine ran.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014