When Environments are Automatically Initialized in MVS - IBM-REXX

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.

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.

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.

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.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM-REXX Topics