z/OS TSO/E REXX Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using the environment block for reentrant environments

z/OS TSO/E REXX Reference
SA32-0972-00

If you want to use a reentrant environment, you must explicitly call the initialization routine, IRXINIT, to initialize the environment. TSO/E REXX automatically initializes non-reentrant environments only. When you invoke IRXINIT to initialize a reentrant environment, you must set the RENTRANT flag on (see Flags and corresponding masks).

An application program would use a reentrant environment when it wants to isolate itself and its characteristics from other application programs. For example, an application program may provide a storage management routine, but does not want any other program to use the storage management routine. To ensure this, you would use IRXINIT to initialize the environment and set the RENTRANT flag on. When the RENTRANT flag is on, the environment is not added to the existing chain of environments. Instead, the environment is an independent entry isolated from all other environments.

The system routines do not locate reentrant environments. Additionally, if you use IRXINIT to find an environment, IRXINIT finds non-reentrant environments only, not reentrant environments. You can use a reentrant environment that you have initialized only by explicitly passing the address of the environment block for the reentrant environment when you call a TSO/E REXX programming routine. If you want to invoke a TSO/E REXX routine to run in a reentrant environment, you must pass the address of the environment block for the reentrant environment on the call to the routine. You can pass the address either in the parameter list (in the environment block address parameter) or in register 0.

If you do not explicitly pass an environment block address, the routine locates the current non-reentrant environment and runs in that environment.

Each task that is using REXX must have its own language processor environment. Two tasks cannot simultaneously use the same language processor environment for REXX processing.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014