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


Format of the work block extension

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

The work block extension contains information about the REXX exec that is currently running. The environment block points to the work block extension.

When IRXINIT first initializes a new environment and creates the environment block, the address of the work block extension in the environment block is 0. The address is 0 because a REXX exec is not yet running in the environment. At this point, IRXINIT is only initializing the environment.

When an exec starts running in the environment, the environment block is updated to point to the work block extension describing the exec. If an exec is running and invokes another exec, the environment block is updated to point to the work block extension for the second exec. The work block extension for the first exec still exists, but the environment block does not point to it. When the second exec completes and returns control to the first exec, the environment block is changed again to point to the work block extension for the original exec.

The work block extension contains the parameters that are passed to the IRXEXEC routine to invoke the exec. You can call IRXEXEC explicitly to invoke an exec and pass the parameters on the call. If you use IRXJCL, implicitly or explicitly invoke an exec in TSO/E, or run an exec in TSO/E background, the IRXEXEC routine always gets control to run the exec. Exec processing routines - IRXJCL and IRXEXEC describes the IRXEXEC routine in detail and each parameter that IRXEXEC receives.

Table 1 shows the format of the work block extension. TSO/E provides a mapping macro, IRXWORKB, for the work block extension. The mapping macro is in SYS1.MACLIB.

Table 1. Format of the work block extension
Offset (decimal) Number of bytes Field name Description
0 4 EXECBLK The address of the exec block (EXECBLK). See The exec block (EXECBLK) for a description of the control block.
4 4 ARGTABLE The address of the arguments for the exec. The arguments are arranged as a vector of address/length pairs followed by X'FFFFFFFFFFFFFFFF'. See Format of argument list for a description of the argument list.
8 4 FLAGS A fullword of bits that IRXEXEC uses as flags. IRXEXEC uses bits 0, 1, 2, and 3 only. The remaining bits are reserved. Bits 0, 1, and 2 are mutually exclusive.
  • Bit 0 – If the bit is on, the exec was invoked as a "command" (that is, the exec was not invoked from another exec as an external function or subroutine).
  • Bit 1 – If the bit is on, the exec was invoked as an external function (a function call).
  • Bit 2 – If the bit is on, the exec was invoked as a subroutine using the CALL instruction.
  • Bit 3 – If the bit is on and a syntax error occurs, IRXEXEC returns a return code from 20001 – 20099. If the bit is off and a syntax error occurs, IRXEXEC returns with return code 0. See Table 1 for more information about bit 3.
12 4 INSTBLK The address of the in-storage control block (INSTBLK). See The in-storage control block (INSTBLK) for a description of the control block.
16 4 CPPLPTR The address of the command processor parameter list (CPPL) if you invoked the exec from the TSO/E address space. If you invoked the exec from a non-TSO/E address space, the address is 0.
20 4 EVALBLOCK The address of the evaluation block (EVALBLOCK). See The evaluation block (EVALBLOCK) for a description of the control block.
24 4 WORKAREA The address of an 8-byte field that defines a work area for the IRXEXEC routine. See Table 1 for more information about the work area.
28 4 USERFIELD The address of the user field that is passed to IRXEXEC if you explicitly called IRXEXEC. You pass the address of the user field in parameter 8 (see The IRXEXEC routine for information about the parameters). You can use this field for your own processing. Any of the REXX services do not use this field.
32 4 RTPROC A fullword that is available for use by a REXX compiler runtime processor. This field allows a compiler runtime processor to have an anchor that is unique for each compiled REXX exec that runs within a language processor environment. A compiler runtime processor can use this field for its own purpose. TSO/E REXX does not check or change this field.
36 4 SOURCE_ADDRESS The address of the PARSE SOURCE string for the exec currently processing. This is the string that the PARSE SOURCE instruction would return.
40 4 SOURCE_LENGTH The length of the PARSE SOURCE string that is pointed to by the SOURCE_ADDRESS field at offset +36 (decimal).

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014