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


When environments are automatically initialized in MVS

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

As described in the previous topic, the system automatically initializes a language processor environment in the TSO/E address space whenever a user logs on to TSO/E and when a user invokes ISPF. After a TSO/E session has been started, users can simply invoke a REXX exec and the exec runs in the language processor environment in which it was invoked.

In non-TSO/E address spaces, the system does not automatically initialize language processor environments at a specific point, such as when the address space is activated. The system initializes an environment whenever you invoke the IRXJCL or IRXEXEC routine to invoke a REXX exec if an environment does not already exist on the current task.

TSO/E provides the TSO/E environment service, IKJTSOEV, that lets you create a TSO/E environment in a non-TSO/E address space. If you invoke IKJTSOEV to create a TSO/E environment, IKJTSOEV also initializes a REXX language processor environment within that TSO/E environment. IKJTSOEV initializes the language processor environment only if another language processor environment does not already exist in that address space. See z/OS TSO/E Programming Services for more information about the TSO/E environment service, IKJTSOEV.

You can run a REXX exec in MVS™ batch by specifying IRXJCL as the program on the JCL EXEC statement. You can invoke either the IRXJCL or IRXEXEC routines from a program in any address space to invoke an exec. Exec processing routines - IRXJCL and IRXEXEC describes the two routines in detail.

When the IRXJCL or IRXEXEC routine is called, the routine determines whether a language processor environment already exists. (As discussed previously, more than one environment can be initialized in a single address space. The environments are chained together in a hierarchical structure). IRXJCL or IRXEXEC do not invoke IRXINIT to initialize an environment if an environment already exists. The routines use the current environment to run the exec. Chains of environments and how environments are located describes how language processor environments are chained together and how environments are located.

If either IRXEXEC or IRXJCL invokes the IRXINIT routine to initialize an environment, after the REXX exec completes processing, the system calls the IRXTERM routine to terminate the environment that IRXINIT initialized.

Tip: If several language processor environments already exist when you invoke IRXJCL or IRXEXEC, you can pass the address of an environment block in register 0 on the call to indicate the environment in which the exec should run. For more information, see Using the environment block .

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014