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


Using the environment block address parameter

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

The parameter lists of most of the TSO/E REXX routines contain the environment block address parameter. This parameter lets you specify the address of the environment block that represents the environment in which you want the routine to run. If you use the environment block address parameter, the routine uses the address you specify and ignores the contents of register 0. Additionally, the routine does not check the address you specify. Therefore, you must ensure that you pass a correct environment block address or unpredictable results may occur. For example, if you specify an invalid address, the routine may return with a return code of 28, which indicates a language processor environment could not be located. In other cases, processing could abend.

You could also specify an address for an environment that exists, but the address may be for a different environment than the one you want to use. In this case, the routine may run successfully, but the results will not be what you expected. For example, suppose you have four environments initialized in an address space; environments 1, 2, 3, and 4. You want to invoke the trace and execution control routine, IRXIC, to halt the interpretation of execs in environment 2. However, when you invoke IRXIC, you specify the address of the environment block for environment 4, instead of environment 2. IRXIC completes successfully, but the interpretation of execs is halted in environment 4, rather than in environment 2. This is a subtle problem that may be difficult to determine. Therefore, if you use the environment block address parameter, you must ensure the address you specify is correct.

If you do not want to pass an address in the environment block address parameter, specify a value of 0. Also, the parameter lists for the TSO/E REXX routines are of variable length. That is, register 1 points to a list of addresses and each address in the list points to a parameter. The end of the parameter list is indicated by the high-order bit being on in the last address in the parameter list. If you do not want to use the environment block address parameter and there are no other parameters after it that you want to use, you can simply end the parameter list at a preceding parameter. For more information about parameter lists, see Parameter lists for TSO/E REXX routines.

If you are using the environment block address parameter and you are having problems debugging an application, you may want to set the parameter to 0 for debugging purposes. This lets you determine whether any problems are a result of this parameter being specified incorrectly.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014