Primary-level name/token pair

A primary-level name/token pair can be used when programs running under different tasks in the primary address space need to use the data.

Figure 1 shows the primary-level name/token pair in a cross-memory environment.
Figure 1. Using the Primary Level in a Cross-Memory Environment
ieaa8upl
In Figure 1:
  1. TASK 1 creates task-level (N1,T1), home-level (N2,T2), and primary-level (N3,T3) name/token pairs using the IEANTCR callable service.
  2. TASK 1 contains a program call (PC) instruction that transfers control to PCROUTINE1 in ADDRESS SPACE 2. PCROUTINE1's home address space is ADDRESS SPACE 1 and its primary address space is ADDRESS SPACE 2.
  3. PCROUTINE1 creates a home-level name/token pair (N5,T5) associated with ADDRESS SPACE 1, a primary-level name/token pair (N6,T6) associated with ADDRESS SPACE 2, and a task-level name/token pair (N7,T7) associated with TASK 1 that was dispatched in ADDRESS SPACE 1. PCROUTINE1 also retrieves a primary-level name/token pair (N8,T8) that was previously created by TASK2.

When the primary address space and home address space of the creating task are the same, both the primary-address-space level and the home-address-space level of the pair it creates are the same. For example, when PASN=HASN, a program could create a name/token pair with a primary-address-space level and retrieve it with a home-address-space level. IBM® recommends that in this situation, the program use the home-address-space level for retrieving the pair.

When the primary address space and home address space are different, as in a cross-memory environment, the home-address-space level and primary-address-space levels are different. A program can use the home level to access pairs associated with the home address space and use the primary-address-space level to access entries associated with the primary address space. For a given pair, you cannot use the levels interchangeably.

A cross-memory server application might want to retrieve name/token pairs using the primary-address-space level to locate control structures contained in the primary address space. In Figure 1, notice that PCROUTINE1 retrieves a primary-level name/token pair (N8,T8). Even though TASK 2 created the name/token pair (N8,T8) as a home-level pair, PCROUTINE1 retrieves the pair as a primary-level name/token pair.