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


Assigning storage to the subspaces

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

Before a program can reference subspace storage, the program must associate an eligible range of storage with the subspace. Storage is eligible to be assigned to a subspace once it has been specified on an IARSUBSP IDENTIFY request. Storage that has been assigned to a subspace can be referenced only by a program running in that subspace, or by a program running with full address space addressability.

Use the IARSUBSP macro with the ASSIGN parameter to associate a subspace with its storage. Either an authorized or unauthorized program can perform this step. Specify a storage range from the storage you obtained, and the STOKEN returned when you created the subspace.

One way to design your server program is to create a loop in the server program. For each request to the server program for application program services, the program loop:

  1. Assigns a storage range to a subspace
  2. Issues the BSG instruction to switch to subspace addressability
  3. Passes control to the application program
  4. Receives control after the application program finishes its processing
  5. Issues the BSG instruction to switch to full address space addressability
  6. Disassociates the storage from the subspace (described in more detail in Disassociating storage from the subspaces).

This design ensures that there is a subspace available for the application program to run in. It also allows eligible storage to be reassigned to different subspaces as needed, while preventing application programs from referencing the storage as it is being reassigned.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014