CLEAR command
The CLEAR
command removes the actions of previously
entered z/OS® Debugger commands.
Some breakpoints are removed automatically when z/OS Debugger determines
that they are no longer meaningful. For example, if you set a breakpoint
in a fetched or loaded compile unit, the breakpoint is discarded when
the compile unit is released.
AT
- Removes all breakpoints, including
GLOBAL
breakpoints, set by previously enteredAT
commands, except forAT TERMINATION
and suspended breakpoints.AT_command
- A valid
AT
command that includes at least one operand. TheAT
command must be complete except that the every_clause and command are omitted. generic_AT_command
- A valid
AT
command without operands. It can be one of the following:ALLOCATE
,APPEARANCE
,CALL
,CHANGE
,CURSOR
,DATE
,DELETE
,ENTRY
,EXIT
,LABEL
,LOAD
,OFFSET
,OCCURRENCE
,PATH
,STATEMENT
(theLINE
keyword can be used in place ofSTATEMENTS
), orTERMINATION
.
DECLARE
- Removes previously defined variables and tags. If no identifier follows
DECLARE
, all session variables and tags are cleared.DECLARE
is equivalent toVARIABLES
.- identifier
- The name of a session variable or tag declared during the z/OS Debugger session. This operand must follow the rules for the current programming language.
EQUATE
- Removes previously defined symbolic references. If no identifier follows
EQUATE
, all existingSET EQUATE
synonyms are cleared.- identifier
- The name of a previously defined reference synonym declared during
the z/OS Debugger session
using
SET EQUATE
. This operand must follow the rules for the current programming language.
- LDD
- Removes one or more
LOADDEBUGDATA (LDD)
commands known to z/OS Debugger. TheLDD
command's sub-parameter must be one of those listed in the output of theLIST LDD
command. It is recommended that you enter theLIST LDD
command before eachCLEAR LDD
command because theLDD
entry numbers are affected by previousCLEAR LDD
commands. This command has the following sub-parameters:- *
- Removes all
LDD
commands known to z/OS Debugger across all enclaves. - number
- A positive integer that refers to the output of the
LIST LDD
command. If a list of integers is specified, all commands that are represented by the specified list are cleared. - ldd_number_range
- Identifies the first and last number as seen in the
LIST LDD
command's output, separated by a hyphen (-), that you want to clear. When the current programming language setting is COBOL, blanks are required around the hyphen (-). Blanks are optional for other programming languages. However, in remote debug mode, blanks are required around the hyphen (-) for all programming languages.
Usage note
You can use the
CLEAR LDD
command in remote debug mode. LOAD
- Removes the load module. This command has the following sub-parameter:
- module_name
- The name of one or more load modules that were loaded by z/OS Debugger using
the
LOAD
command.
LOG
- Erases the log file and clears out the data being retained for
scrolling. In line mode,
CLEAR LOG
clears only the log file.If the log file is directed to a SYSOUT type file,
CLEAR LOG
will not clear the log contents in the file. MEMORY
- Clears the Memory window including the memory currently being displayed, the base address, and the history area.
MONITOR
- Clears the commands defined for
MONITOR
. If no number followsMONITOR
, the entire list of commands affecting the monitor window is cleared; the monitor window is empty.- number
- A positive integer that refers to a monitored command. If a list of integers is specified, all commands represented by the specified list are cleared.
- monitor_number_range
- Identifies the first and last monitor number in a range of monitors, separated by a hyphen (-), that you want to delete. When the current programming language setting is COBOL, blanks are required around the hyphen (-). Blanks are optional for other programming languages.
CURSOR
- Indicates that you want to delete the variable identified by the cursor’s current location. The cursor can be placed only in the Monitor window.
ON
(PL/I)- Removes the effect of an earlier ON command. If no pli_condition follows
ON, all existing ON commands are cleared.
- pli_condition
- Identifies an exception condition for which there is an
ON
command defined.
PROCEDURE
- Clears previously defined z/OS Debugger procedures.
If no procedure_name follows
PROCEDURE
, all inactive procedures are cleared.- procedure_name
- The name given to a sequence of z/OS Debugger commands
delimited by a
PROCEDURE
command and a correspondingEND
command. The procedure must be currently in storage and not active.
VARIABLES
- Removes previously defined variables and tags. If no identifier follows
VARIABLES
, all session variables and tags are cleared.VARIABLES
is equivalent toDECLARE
.- identifier
- The name of a session variable or tag declared during the z/OS Debugger session. This operand must follow the rules for the current programming language.
Usage notes
- You can use the
CLEAR AT
command to clear either active or suspended breakpoints. However, you cannot use it to clear suspended label breakpoints. - If you want to clear a suspended breakpoint, you must specify both the load module and CU name.
- You can use the
CLEAR LOAD
command in remote debug mode. - In some environments, a loaded module cannot be removed from storage. In this case the command fails and the load module remains in storage.
- You can enter
CL
in the prefix area of the monitor window to clear the selected line in the Monitor window. You can enterCC
prefix commands to clear a selected block of lines from the Monitor window. - You can use the
CLEAR MONITOR n
command to clear an automonitor entry in the Monitor window. - Only an
AT LINE
orAT STATEMENT
breakpoint can be cleared with aCLEAR AT CURSOR
command. - To clear every single breakpoint in the z/OS Debugger session,
issue
CLEAR AT
followed byCLEAR AT TERMINATION
. - To clear a global breakpoint, you can specify an asterisk (*)
with the
CLEAR AT
command or you can specify aCLEAR AT GLOBAL
command.If you have only a global breakpoint set and you specify
CLEAR AT ENTRY
without the asterisk (*) orGLOBAL
keyword, you get a message saying there are no such breakpoints. - The
CLEAR AT
,CLEAR DECLARE
,CLEAR LDD
,CLEAR ON
, andCLEAR VARIABLES
commands cannot be used while you replay recorded statements by using thePLAYBACK
commands. - To use the cursor to indicate which variable in the
Monitor window to remove, do one of the following methods:
- Assign the
CLEAR MONITOR CURSOR
to a PF key. Move the cursor to a variable in the Monitor window and press the PF key. This method is more convenient. - Type the
CLEAR MONITOR
command on the command line, then move the cursor to a variable in the Monitor window. Press Enter.
- Assign the
- Based on the application flow and structure, the
CLEAR LDD
command might not take effect until the next z/OS Debugger session is started. - The
CLEAR LDD *
command removes allLDD
commands known to z/OS Debugger across all enclaves. - Because the
SAVEBPS
data set is updated during each enclave exit, if at any time theCLEAR LDD
command is issued afterwards, theLDD
commands will have already been saved in theSAVEBPS
data set and thus will be restored during the next debug session. - The
SET EXPLICITDEBUG ON
command takes precedence over theCLEAR LDD
command. As a result, even though theCLEAR LDD
command is processed, it will not undo the already processedLDD
command.
Examples
- Remove the
LABEL
breakpoint set in the program at labelcreate
.CLEAR AT LABEL create;
- Remove previously defined variables
x
,y
, andz
.CLEAR DECLARE (x, y, z);
- Remove the effect of the ninth command defined for
MONITOR
.CLEAR MONITOR 9;
- Remove the structure type definition
tagone
(assuming all variables declared interactively using the structure tag have been cleared). The current programming language setting is C.CLEAR VARIABLES struct tagone;
- Establish some breakpoints with the
AT
command and then remove them with theCLEAR
command (checking the results with theLIST
command).AT 50; AT 56; AT 55 LIST (r, c); LIST AT; CLEAR AT 50; LIST AT; CLEAR AT; LIST AT;
- If you want to clear an
AT ENTRY *
breakpoint, specify:CLEAR AT ENTRY *; or CLEAR AT GLOBAL ENTRY;
- If you want to remove the DATE breakpoint for block MYBLOCK, specify:
CLEAR AT DATE MYBLOCK;
- If you want to remove a generic DATE breakpoint, specify:
CLEAR AT DATE *;
The following examples show how to display the
LDD
commands known to z/OS Debugger and how to use theCLEAR LDD
command:- To display the
LDD
commands known to z/OS Debugger, specify:LIST LDD;
Suppose that you get the following output:
To remove all the1. LDD TBND003::>TBND003A; 2. LDD MYPROG; 3. LDD MYPROG3; 4. LDD PROG4::>PROG5;
LDD
commands, specify:CLEAR LDD *;
If you then enter the following command:
You will get the following result:LIST LDD;
There are no LDD commands established.
- To display the
LDD
commands known to z/OS Debugger, specify:LIST LDD;
Suppose that you get the following output:
To remove the1. LDD 1A::>1AB; 2. LDD PGM1C;
LDD 1A::>1AB
command, specify:CLEAR LDD 1;
- To display the
LDD
commands known to z/OS Debugger, specify:LIST LDD;
Suppose that you get the following output:
If you then enter the1. LDD TBND005::>TBND005A; 2. LDD MYPROG; 3. LDD MYPROG5; 4. LDD PROG5::>PROG5Y;
CLEAR LDD 5
command, you will get the following output:No LDD command was established for LDD 5.
- To display the
LDD
commands known to z/OS Debugger, specify:LIST LDD;
Suppose that you get the following output:
If you then enter the1. LDD TBND003::>TBND003A; 2. LDD MYPROG; 3. LDD MYPROG3; 4. LDD PROG3::>PROG3C;
CLEAR LDD (1,4)
command, you will get the following output:Removes LDD TBND003::>TBND003A and LDD PROG3::>PROG3C
- To display the
LDD
commands known to z/OS Debugger, specify:LIST LDD;
Suppose that you get the following output:
If you then enter the1. LDD TBND003::>TBND003A; 2. LDD MYPROG; 3. LDD MYPROG3; 4. LDD PROG6::>PROG6F;
CLEAR LDD 4 – 5
command (for COBOL or all languages in remote debug mode), you will get the following output:
However, z/OS Debugger removes theNo LDD command was established for LDD 5.
LDD PROG6::>PROG6F
command.
- To display the
Refer to the following topics for more information related to the material discussed in this topic.