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


Writing exits for the EXEC command

z/OS TSO/E Customization
SA32-0976-00

TSO/E users issue the EXEC command to execute REXX execs or CLISTs. The EXEC command receives control when the user specifies it in one of the following forms:
  • Explicit form - EXEC or EX is followed by the name of the data set containing the REXX exec or CLIST.
  • Implicit form - The name of a member of a REXX exec or CLIST library is entered without the command name, EXEC or EX. A library is a partitioned data set (PDS) that must be allocated to the specific REXX exec or CLIST (SYSEXEC or SYSPROC) either dynamically by the ALLOCATE command or the ALTLIB command, or as part of the logon procedure.
  • Extended implicit form - A percent sign (%) precedes the name of a member of a REXX exec or CLIST library.

Processing for a CLIST is done in two steps: phase 1, which is performed by the EXEC command processor, and phase 2. In phase 1, the EXEC command processor reads the CLIST records from the input data set and builds an in-storage command procedure. EXEC then places the command procedure that it built on the input stack. This stack is maintained by TSO/E to determine the source of input. Phase 2 processing receives control as each record in the command procedure is removed from the stack.

TSO/E provides initialization and termination exits that you can use to customize the EXEC command. These exits receive control during EXEC command processing, as follows:
  • If the explicit form is used to invoke EXEC, the initialization exit receives control before the EXEC command processor invokes the parse service routine to syntax check the input parameters.
  • If the implicit form is used to invoke EXEC, the initialization exit receives control before the EXEC command processor invokes the command scan service routine to syntax check the input parameters.
  • The termination exit receives control just before the EXEC command terminates processing.

TSO/E users can invoke the EXEC command in the TEST or EDIT environment to perform the same basic functions as the EXEC command. Exits that you write to customize the EXEC command are also in effect when the EXEC command is executed in the TEST or EDIT environment.

The following paragraphs highlight some ways you can use the initialization and termination exits. For more information about how you can use the exits, see Possible uses.

Some ways you can use the initialization exit include:
  • Providing default values for symbolic variables that are used in CLISTs
  • Changing the default values for operands of the EXEC command
  • Invoking alternate interpreters
Some ways you can use the termination exit include:
  • Performing clean-up processing
  • Changing the default CONTROL options for CLISTs
TSO/E also provides several other exits that you can use to customize CLIST processing:

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014