Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Locating a Language Processor Environment z/OS TSO/E REXX Reference SA32-0972-00 |
|
A REXX environment is considered integrated into TSO/E if the address space is a TSO/E address space and the environment has the TSOFL flag set on. Otherwise the environment is not integrated into TSO/E (TSOFL flag off). For the following discussion, a REXX environment that is integrated into TSO/E will be referred to as a "TSO/E environment"; and a REXX environment that is not integrated into TSO/E will be referred to as a "non-TSO/E environment." For more information, see Types of environments - integrated and not integrated into TSO/E. Whenever you invoke a REXX exec or routine, the exec or routine must run in a language processor environment. The one exception is the initialization routine, IRXINIT, which initializes environments. In the TSO/E address space, the system always initializes a default language processor environment when you log on TSO/E and when you invoke ISPF. If you call a REXX programming routine from TSO/E, the routine runs in the environment in which you called it. If you invoke an exec using the IRXJCL or IRXEXEC routine, a language processor environment may or
may not already exist. If an environment does not exist on the
IRXINIT always locates a previous language processor environment. If an environment does not exist on the current task (TSO/E or non-TSO/E environment) or on a parent task (TSO/E environment only), IRXINIT uses the values in the IRXPARMS parameters module as the previous environment. A language processor environment must already exist if you call the TSO/E REXX programming routines IRXRLT, IRXSUBCM, IRXIC, IRXEXCOM, and IKJCT441 or the replaceable routines. These routines do not invoke IRXINIT to initialize a new environment. If an environment does not already exist and you call one of these routines, the routine completes unsuccessfully with a return code. See TSO/E REXX programming services for information about the TSO/E REXX programming routines and Replaceable routines and exits for information about the replaceable routines. When IRXINIT initializes a new language processor environment, IRXINIT creates a number of control blocks that contain information about the environment and any REXX exec currently running in the environment. The main control block is the environment block (ENVBLOCK), which points to other control blocks, such as the parameter block (PARMBLOCK) and the work block extension. Control blocks created for a Language Processor Environment describes the control blocks that IRXINIT creates for each language processor environment. The environment block represents its language processor environment and is the anchor that the system uses on calls to all REXX programming service routines. Whenever you call a REXX programming service routine, you can pass the address of an environment block in register 0 on the call. By passing the address, you can specify in which language processor environment you want the routine to run. For example, suppose you invoke the initialization routine, IRXINIT, in a non-TSO/E address space. On return, IRXINIT returns the address of the environment block for the new environment in register 0. You can store that address for future use. Suppose you call IRXINIT several times to initialize a total of four environments in that address space. If you then want to call a TSO/E REXX programming service routine and have the routine run in the first environment on the chain, you can pass the address of the first environment's environment block on the call. You can also pass the address of the environment block in register 0 to all REXX replaceable routines and exit routines. Some service routines also allow the address of the environment block to be passed as a parameter, in place of using register 0. If the parameter is used in these cases, register 0 is ignored. When a programming service routine is called, the programming service routine must determine in which environment to run. The routine locates the environment as follows:
The IRXINIT routine initializes a new language processor environment. Therefore, IRXINIT does not need to locate an environment in which to run. However, IRXINIT does locate a previous environment to determine what values to use when defining the new environment. The following summarizes the steps IRXINIT takes to locate the previous environment:
Initialization routine - IRXINIT describes how the IRXINIT routine determines what values to use when you explicitly call IRXINIT. |
Copyright IBM Corporation 1990, 2014
|