REXX Exit Routines - IBM-REXX

There are many exit routines you can use to customize REXX processing. The exits differ from other exit routines that TSO/E provides, such as exits for TSO/E command processors. Some of the REXX exits have fixed names while others you name yourself. Several exits receive parameters on entry and others receive no parameters.

Generally, you use exit routines to customize a particular command or function on a system-wide basis. You use the REXX exits to customize different aspects of REXX processing on a language processor environment basis. The following highlights the exits you can use for REXX. z/OS TSO/E Customization describes the exits in more detail. However, many of the exits receive the parameters that a caller passed on a call to a REXX routine, such as IRXINIT and IRXEXEC. Therefore, you will need to use z/OS TSO/E Customization and this book for complete information.

Some of the REXX exits do not have fixed names. You supply the name yourself and then define the name in the appropriate fields in the module name table. In the module name table, you also define the names of replaceable routines you provide. However, unlike the replaceable routines, which you can provide only in language processor environments that are not integrated into TSO/E, you can use the REXX exits in any type of environment (integrated and not integrated into TSO/E). One exception is the attention handling exit, which is available only in TSO/E (in an environment that is integrated into TSO/E).

Exits for Language Processor Environment Initialization and Termination

There are four exits you can use to customize the initialization and termination of language processor environments in any address space. The names of the four exits are fixed. If you provide one or more of these exits, the exit is invoked whenever the IRXINIT and IRXTERM routines are called. The exits are invoked whenever a user explicitly calls IRXINIT and IRXTERM or when the system automatically calls the routines to initialize and terminate a language processor environment. The exits are briefly described below.

IRXINITX
This is the pre-environment initialization exit routine. The exit is invoked whenever the initialization routine IRXINIT is called to initialize a new language processor environment. The exit receives control before IRXINIT evaluates any parameters to use to initialize the environment. The exit routine receives the same parameters that IRXINIT receives. You can provide a pre-environment initialization exit in any type of language processor environment (integrated and not integrated into TSO/E).

IRXITTS or IRXITMV
There are two post-environment initialization exit routines:

  • IRXITTS for environments that are integrated into TSO/E (the TSOFL flag is on)
  • IRXITMV for environments that are not integrated into TSO/E (the TSOFL flag is off)

The IRXITTS exit is invoked whenever IRXINIT is called to initialize a new environment and the environment is to be integrated into TSO/E. The IRXITMV exit is invoked whenever IRXINIT is called to initialize a new environment and the environment is not to be integrated into TSO/E. The exits receive control after IRXINIT has initialized the language processor environment and has created the control blocks for the environment, such as the environment block and the parameter block. The exits do not receive any parameters.

IRXTERMX
This is the environment termination exit routine. The exit is invoked whenever the termination routine IRXTERM is called to terminate a language processor environment. The exit receives control before IRXTERM terminates the environment. The exit does not receive any parameters. You can provide an environment termination exit in any type of language processor environment (integrated and not integrated into TSO/E).

Exec Initialization and Termination Exits

You can provide exits for exec initialization and termination. The exec initialization exit is invoked after the variable pool for a REXX exec has been initialized, but before the language processor processes the first instruction in the exec.

The exec termination exit is invoked after a REXX exec has completed, but before the variable pool for the exec has been terminated. The exec initialization and termination exits do not have fixed names. You name the exits yourself and define the names in the following fields in the module name table:

  • EXECINIT - for the exec initialization exit
  • EXECTERM - for the exec termination exit

The two exits are used on a language processor environment basis. You can provide an exec initialization and exec termination exit in any type of environment (integrated and not integrated into TSO/E). You define the exit names in the module name table by:

  • Providing your own parameters module that replaces the default module, or
  • Calling IRXINIT to initialize a language processor environment and passing the module name table on the call.

Exec Processing (IRXEXEC) Exit Routine

You can provide an exec processing exit that is invoked whenever the IRXEXEC routine is called to invoke a REXX exec. The IRXEXEC routine can be explicitly called by a user or called by the system to invoke an exec. IRXEXEC is always called by the system to handle exec processing. For example, if you run a REXX exec in TSO/E using the EXEC command, the IRXEXEC routine is called to invoke the exec. If you provide an exit routine for IRXEXEC, the exit is invoked.

The exit for the IRXEXEC routine does not have a fixed name. You name the exit yourself and define the name in the IRXEXECX field in the module name table.

The exit is used on a language processor environment basis. You can provide an exec processing exit in any type of environment (integrated and not integrated into TSO/E). You define the exit name in the module name table by:

  • Providing your own parameters module that replaces the default module, or
  • Calling IRXINIT to initialize a language processor environment and passing the module name table on the call

The exit is invoked before the IRXEXEC routine loads the exec, if the exec is not preloaded, and before IRXEXEC evaluates any parameters passed on the call.

Attention Handling Exit Routine

You can provide an attention handling exit routine that is invoked whenever an exec is running in the TSO/E address space (in a language processor environment that is integrated into TSO/E) and an attention interruption occurs. The exit does not have a fixed name. You name the exit yourself and define the name in the ATTNROUT field in the module name table.

The exit is used on a language processor environment basis. You can provide an attention handling exit in the TSO/E address space only, in an environment that is integrated into TSO/E (the TSOFL flag is on). You define the exit name in the module name table by:

  • Providing your own parameters module that replaces the default IRXTSPRM or IRXISPRM module, or
  • Calling IRXINIT to initialize a language processor environment and passing the module name table on the call

The exit is invoked when a REXX exec is running and the user presses the attention interrupt key (usually the PA1 key).The exit gets control before REXX attention processing issues the prompting message, IRX0920I, that asks the user to enter a null line to continue exec processing or one of the immediate commands. The exit is useful if your installation users are unfamiliar with TSO/E READY mode.

You can write an exit to:

  • Halt the interpretation of the exec using either the EXECUTIL HI command or the IRXIC routine
  • Request that REXX attention processing not display the attention prompting
    message
  • Prohibit the use of the HE immediate command during REXX attention processing.

If you provide an attention handling exit routine, the exit should not invoke any authorized commands or programs. Additionally, any unauthorized commands or programs that the exit invokes should be invoked from an unauthorized TSO service facility environment. Otherwise, unpredictable results may occur.

To invoke an unauthorized command or program from an unauthorized TSO service facility environment, you can request the TSO service facility to set up an unauthorized TSO service facility environment for the command or program invocations.

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

IBM-REXX Topics