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


Example of the rules for accessing data spaces

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

Another way of describing the rules for accessing data spaces is through an example. Figure 1 shows two address spaces and two data spaces. The entries in the PASN-AL and DU-AL are identified.

Two programs run in address space AS1, both of which own data spaces:
  • A problem state program, PGM1, running under TCB A that owns SCOPE=SINGLE data space DS1

    PGM1 can access DS1 through the DU-AL, because it runs in problem state. PGM1 cannot add an entry for DS1 to the PASN-AL.

  • A supervisor state program, PGM2, running under TCB B that owns SCOPE=ALL data space DS2

    PGM2 can access DS2 through its PASN-AL. (If PGM1 passes the STOKEN for DS1 to PGM2, PGM2 could add an entry to the PASN-AL for DS1. If PGM2 passes the ALET for DS2 to PGM1, PGm1 could access DS2 through the PASN-AL.)

Two programs run in address space AS2, neither of which own data spaces:
  • A problem state program, PGM3, running under TCB C

    PGM3 cannot access either DS1 or DS2.

  • A supervisor state program, PGM4, running under TCB D

    PGM4 can access DS2 through its DU-AL.

PGM2 has passed a STOKEN for the SCOPE=ALL data space DS2 to PGM4 in address space AS2. PGM4 used the STOKEN as input to ALESERV, which placed an entry for DS2 on the DU-AL and returned the ALET. PGM4 could have added the entry for DS2 to its PASN-AL.

Earlier in this chapter, it was stated that storage within a data space is available to programs that run under the TCB that owns the data space. The exception to this statement is when the owning TCB has the data space entry on the PASN-AL and a program running under the TCB uses a space-switching PC instruction. During the time that the primary address space is not the owning TCB's home address space, the program cannot access the data space. For example, in Figure 1, consider what happens to PGM2 if it should PC to PGM3. Because the entry for DS2 is on AS1's PASN-AL, PGM2 cannot access DS2 while it is running in AS2.

Figure 1. Example of Rules for Accessing Data Spaces

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014