You
can use this user exit to monitor and restrict commands invoked through
ISPF. In addition, you can also use the user exit to allow TSO commands
newly added to the system to be invoked from within ISPF without updating
the ISPF TSO command table (ISPTCM). If the invoked command is not
an implicit CLIST (not prefixed by %), the TCM is searched. This exit
is called immediately after searching the TCM. For implicit CLISTs,
the exit is called before attaching the exec processor.
Note: This
user exit will not be invoked for TSO commands issued from REXX execs.
Exit parameters
In addition to the standard
exit parameters described in
Exit parameter list,
the exit routines at this user exit receive these parameters:
- cmdname
- An 8-character field that contains the name of the command that
was invoked. The name is left-justified within the field and padded
with blanks.
If the command is a CLIST, this field contains the
CLIST name. The CLIST name will not include the % prefix if one was
used.
- user flags
- 1 or more bytes of installation data as defined when ISPTCM is
generated. See Customizing the ISPF TSO command table (ISPTCM) for
more information.
- TCM flags
- The flag byte in ISPTCM that ISPF uses to determine what processing
should be done for the command. If the current command is not in ISPTCM,
the default flag byte is provided. The exit routine can change this
value and ISPF uses the value if it receives a return code of 4. See Customizing the ISPF TSO command table (ISPTCM) and ISPTCM usage notes for information about
TCM flags.
- CPPL
- The address of the TSO command processor parameter list (CPPL)
that was passed to ISPF.
When the command is
an implicit CLIST (prefixed by %), the TCM is not searched. In those
cases, the user flags and TCM flags parameters will be binary zeros.
Return codes
- 0
- Normal completion; ISPF continues processing.
- 4
- The exit routine has changed the value of the TCM flag byte. In
this case, ISPF uses the value of the flag to process the command.
However, changes to the TCM flag bit indicating whether the command
should be logged are ignored.
- 16
- Authorization failure. The exit routine indicated that this command
should not be attached. ISPF issues an error message indicating that
the exit routine rejected the command and returns to the caller.
- Other
- ISPF treats the error as severe and issues a message indicating
that the exit routine returned an incorrect return code.