The TSO Client is an ISPF Application that consists of CLIST, REXX, and Program code. Interactive Debug provides the mechanism to interactively trace and debug the CLIST or REXX code.
Invoking DBUG
Typing DBUG on the Command line from within ISPW displays the screen shown in the following figure.
Invoking DBUG
Fields on the Debug Facility screen are described in the following table.
Field Descriptions
Field | Description |
|---|---|
Current DEBUG value | If a debug value has been previously set, this would appear here. When blank, it indicates that Debug is turned off. |
Value to be set? | This determines the level of Debug. All ISPF routines in ISPW have unique Debug values. When the Debug value set on this screen matches the internal routine value, Debug is turned on for that routine. |
REXX Trace setting | This is the REXX Trace option that will be used with the TRACE command. For simple tracing, the value “?R” is used. |
Propagate? | Determines whether Debug is to continue to called routines, irrespective of their internal Debug identifiers. Values can be:
|
Special Value “W”
If “W” is specified in the Value to be set? field, Debug will be turned on for all ISPW routines.
Writing Your Own Routines
When writing custom exits, it is useful to start the routine with the Debug handling code that is used in the ISPW routines. The few lines of code shown in the following figure are from the ISPW routine WZZPSD#.
Writing Routines
Change the highlighted Debug value to something that makes sense for your routine, and it will then be able to be traced in the same way that the ISPW routines are traced.
Calling Other Routines
If you insert a call to another ISPF routine, make sure that the keyword DEBUG is passed as shown in the code snippet below:
"ISPEXEC SELECT CMD(%WZZHFS# "DEBUG" POPT("POPT") "
This will ensure that any Debug values that are set will be passed to the called routine.
Invoking ISPW with DEBUG
The initial REXX Exec WZU@PRIM is user-customizable and may need to be traced to troubleshoot a problem. If the Panel with the ISPW
Option has been updated as described in the ISPW Installation and Configuration Guide, tracing can be turned on by appending the option with “.DEBUG”. For example, if ISPW
is option W, invoke ISPW
with the DEBUG option by typing:
W.DEBUG