Setting and Deleting Keeps
Related topics
Code Debug CICS uses keeps in selecting variables for display during a break/abend. When a break/abend occurs, these variables are displayed either on the Break/Abend screen (2.1), or in the keep window of the Source Listing screen (2.L). You can display and modify the current contents of variables during program execution by typing over the displayed value. There is no limit to the number of variables that you can keep.
Keeps that you set yourself are called explicit keeps. Code Debug CICS automatically sets temporary keeps for all variables referenced in the current statement. These are called automatic keeps or autokeeps. Autokeeps are sorted for display below any explicit keeps you set. Intelligent Autokeeps (called intellikeeps) are Autokeeps of variables modified in the previous statement.
Intelligent Autokeeps
With Intelligent Autokeeps enabled, Code Debug CICS will:
- Retain modified autokeeps when stepping to the next statement
- Suppress duplicate autokeeps when an explicit keep exists.
Retain Modified Autokeeps During Stepping
With Intelligent Autokeeps enabled, Code Debug CICS will retain autokeeps for variables whose value will be modified by the current statement. When you step to the next statement, the autokeep for any variable modified by the previous statement will still be displayed. This type of autokeep is called an intellikeep. Code Debug displays intellikeeps after any explicit keeps and before any new autokeeps associated with the new current statement. This lets you view the changed contents of the variable without having to set an explicit keep. If you step again, the list of autokeeps is refreshed, and any autokeeps which are no longer needed are removed from the list.
Restrictions
The compilers or assemblers used must support a cross-reference that contains the modified tag. Assembler programs must have been processed with release 08.00.00 or above of BMC AMI Common Shared Services. COBOL and PL/I programs must have been processed with release 07.09.00 or above of BMC AMI Common Shared Services. This feature is not yet supported for C programs.
Suppress Duplicate Autokeeps When an Explicit Keep Exists
The second benefit gained by enabling Intelligent Autokeeps is the suppression of duplicate autokeeps. That means if an autokeep is a duplicate of an explicit keep, the autokeep will not be displayed. This eliminates redundancy and helps to unclutter Code Debug’s keep window. Duplicate autokeeps will not be suppressed if the autokeep variable is an array. There are no other restrictions affecting this enhancement.
Help Information
For a more complete explanation of autokeeps and intellikeeps, BMC encourages you to use the HELP AUTOKEEPS and HELP INTELLIKEEPS commands built into Code Debug CICS. These Help topics provide highly detailed information and examples, as well as performing real-time evaluations to point out any restrictions you might encounter while attempting to use these facilities.
Setting Keeps for Qualified Variables
This section discusses using the KEEP primary command to set keeps for qualified variables. If a variable name occurs in multiple definitions in a program, it must be qualified to the point that it is unique.
A data name is either a group or an elementary item and can be unique or not unique. All data names can be qualified. Non-unique data names must be qualified.
For example, suppose the following structures are defined in a program:
02 X 02 X
03 Y 03 Z
X is not unique because it occurs in both structures. Y and Z are unique because they only occur in one definition. To qualify each X you would code:
X in STRUCTURE2
OR
STRUCTURE1.X (PL/I and Assembler syntax)
STRUCTURE2.X
All variables may be qualified if you wish. For example:
STRUCTURE1.X.Y (PL/I and Assembler)
The entire level of qualification is not necessary; only use enough qualification to make the variable unique.
Since a variable can also be defined in more than one PL/I procedure, the PL/I syntax allows for qualifying a variable at the highest level by use of the procedure name in which it is declared.
PROC1:STRUCTURE2.X
PROC2:STRUCTURE1.X
PROC2:STRUCTURE2.X
Removing Keeps
The DELETE primary command is used to remove keeps that have been set. For example, if the KEEP WA-HOURS command was used to set a keep for data name WA-HOURS, the command DELETE KEEP WA-HOURS removes the keep for data name WA-HOURS, and DELETE KEEPS removes all keeps for the program.