Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Chains of environments and how environments are located z/OS TSO/E REXX Reference SA32-0972-00 |
|
As described in previous topics, many language processor environments can be initialized in one address space. A language processor environment is associated with an MVS™ task. There can be several language processor environments associated with a single task. This topic describes how non-reentrant environments are chained together in an address space. Language processor environments are chained together in a hierarchical structure to form a chain of environments. The environments on one chain are interrelated and share system resources. For example, several language processor environments can share the same data stack. However, separate chains within a single address space are independent. Although many language processor environments can be associated with a single MVS task, each individual environment is associated with only one task. Figure 1 illustrates three language processor environments that
form one chain.
Figure 1. Three Language Processor Environments in a
chain
The first environment initialized was environment 1. When IRXINIT initializes the second environment, the first environment is considered to be the previous environment (the parent environment). Environment 2 is chained to environment 1. Similarly, when IRXINIT initializes the third environment, environment 2 is considered to be the previous environment. Environment 2 is the parent environment for environment 3. Different chains can exist in one address space. Figure 2 illustrates two separate tasks, task
1 and task 2. Each task has a chain of environments. For task 1, the
chain consists of two language processor environments. For
task 2, the chain has only one language processor environment. The
two environments on task 1 are interrelated and share system resources.
The two chains are completely separate and independent.
Figure 2. Separate chains on
two different tasks
As discussed previously, language processor environments are
associated with an MVS task.
Under an MVS task, IRXINIT can
initialize one or more language processor environments. The
task can then attach another task. IRXINIT can be called under the
second task to initialize a language processor environment. The
new environment is chained to the last environment under the first
task. Figure 3 illustrates a task that
has attached another task and how the language processor environments are
chained together.
Figure 3. One chain of environments for attached tasks
As shown in Figure 3, task 1 is started and IRXINIT initializes an environment (environment 1). IRXINIT is invoked again to initialize a second language processor environment under task 1 (environment 2). Environment 2 is chained to environment 1. If you invoke a REXX exec within task 1, the exec runs in environment 2. Task 1 then attaches another task, task 2. IRXINIT is called to initialize an environment. IRXINIT locates the previous environment, which is environment 2, and chains the new environment (environment 3) to its parent (environment 2). When IRXINIT is called again, IRXINIT chains the fourth environment (environment 4) to its parent (environment 3). At this point, four language processor environments exist on the chain. |
Copyright IBM Corporation 1990, 2014
|