Debug Tool For Z - OS Users Guide
Debug Tool For Z - OS Users Guide
User's Guide
Version 13.1
SC14-7600-04
Debug Tool for z/OS IBM
User's Guide
Version 13.1
SC14-7600-04
Note!
Before using this information and the product it supports, be sure to read the general information under “Notices” on page
569.
Contents v
Setting breakpoints to halt your program at a line 186 Debugging COBOL when only a few parts are
Setting breakpoints in a load module that is not compiled with TEST . . . . . . . . . .. 218
loaded or in a program that is not active . . .. 186 Capturing COBOL I/O to the system console. .. 219
Controlling how Debug Tool handles warnings Displaying raw storage in COBOL . . . . .. 219
about invalid data in comparisons . . . . .. 187 Getting a COBOL routine traceback . . . . .. 220
Stepping through or running your program . .. 188 Tracing the run-time path for COBOL code
Recording and replaying statements . . . .. 189 compiled with TEST . . . . . . . . . .. 220
Saving and restoring settings, breakpoints, and Generating a COBOL run-time paragraph trace .. 221
monitor specifications . . . . . . . . .. 191 Finding unexpected storage overwrite errors in
Saving and restoring automatically . . . .. 193 COBOL . . . . . . . . . . . . . .. 222
Disabling the automatic saving and restoring of Halting before calling an invalid program in
breakpoints, monitors, and settings . . . .. 194 COBOL . . . . . . . . . . . . . .. 222
Restoring manually . . . . . . . . .. 194
Performance considerations in multi-enclave Chapter 22. Debugging a LangX
environments . . . . . . . . . . . .. 195 COBOL program in full-screen mode . 225
Displaying and monitoring the value of a variable 196
Example: sample LangX COBOL program for
One-time display of the value of variables. .. 196
debugging . . . . . . . . . . . . .. 225
Adding variables to the Monitor window . .. 197
Defining a compilation unit as LangX COBOL and
Displaying the Working-Storage Section of a
loading debug information . . . . . . . .. 227
COBOL program in the Monitor window . .. 198
Defining a compilation unit in a different load
Displaying the data type of a variable in the
module as LangX COBOL . . . . . . . .. 228
Monitor window . . . . . . . . . .. 199
Halting when certain LangX COBOL programs are
Replacing a variable in the Monitor window
called . . . . . . . . . . . . . . .. 228
with another variable. . . . . . . . .. 199
Identifying the statement where your LangX
Adding variables to the Monitor window
COBOL program has stopped . . . . . . .. 228
automatically . . . . . . . . . . .. 200
Displaying and modifying the value of LangX
How Debug Tool handles characters that cannot
COBOL variables or storage . . . . . . .. 229
be displayed in their declared data type . .. 203
Halting on a line in LangX COBOL only if a
Modifying characters that cannot be displayed
condition is true . . . . . . . . . . .. 229
in their declared data type . . . . . . .. 203
Debugging LangX COBOL when debug
Formatting values in the Monitor window. .. 204
information is only available for a few parts . .. 229
Displaying values in hexadecimal format . .. 204
Getting a LangX COBOL program traceback . .. 230
Monitoring the value of variables in
Finding unexpected storage overwrite errors in
hexadecimal format . . . . . . . . .. 205
LangX COBOL . . . . . . . . . . . .. 230
Modifying variables or storage by using a
command . . . . . . . . . . . .. 205
Modifying variables or storage by typing over Chapter 23. Debugging a PL/I program
an existing value . . . . . . . . . .. 206 in full-screen mode . . . . . . . .. 231
Opening and closing the Monitor window. .. 206 Example: sample PL/I program for debugging .. 231
Displaying and modifying memory through the Halting when certain PL/I functions are called .. 234
Memory window . . . . . . . . . . .. 206 Identifying the statement where your PL/I
Modifying memory through the hexadecimal program has stopped . . . . . . . . . .. 234
data area . . . . . . . . . . . . .. 207 Modifying the value of a PL/I variable . . . .. 235
Managing file allocations . . . . . . . .. 207 Halting on a PL/I line only if a condition is true 235
Displaying error numbers for messages in the Log Debugging PL/I when only a few parts are
window . . . . . . . . . . . . . .. 209 compiled with TEST . . . . . . . . . .. 236
Displaying a list of compile units known to Debug Displaying raw storage in PL/I . . . . . .. 236
Tool . . . . . . . . . . . . . . .. 209 Getting a PL/I function traceback . . . . .. 236
Requesting an attention interrupt during Tracing the run-time path for PL/I code compiled
interactive sessions . . . . . . . . . .. 210 with TEST . . . . . . . . . . . . .. 237
Ending a full-screen debug session . . . . .. 210 Finding unexpected storage overwrite errors in
PL/I . . . . . . . . . . . . . . .. 238
Chapter 21. Debugging a COBOL Halting before calling an undefined program in
PL/I . . . . . . . . . . . . . . .. 238
program in full-screen mode . . . .. 213
Example: sample COBOL program for debugging 213
Halting when certain routines are called in COBOL 216 Chapter 24. Debugging a C program
Identifying the statement where your COBOL in full-screen mode . . . . . . . .. 241
program has stopped . . . . . . . . . .. 217 Example: sample C program for debugging . .. 241
Modifying the value of a COBOL variable . . .. 217 Halting when certain functions are called in C .. 244
Halting on a COBOL line only if a condition is true 218 Modifying the value of a C variable . . . . .. 245
Halting on a line in C only if a condition is true 245
Contents vii
Using Debug Tool functions with COBOL . . .. 297 Language Environment conditions and their C and
Using %HEX with COBOL . . . . . . .. 297 C++ equivalents . . . . . . . . . . .. 326
Using the %STORAGE function with COBOL 297 Debug Tool evaluation of C and C++ expressions 327
Qualifying variables and changing the point of Intercepting files when debugging C and C++
view in COBOL . . . . . . . . . . .. 297 programs . . . . . . . . . . . . . .. 328
Qualifying variables in COBOL . . . . .. 297 Scope of objects in C and C++. . . . . . .. 330
Changing the point of view in COBOL . . .. 299 Storage classes in C and C++ . . . . . .. 331
Considerations when debugging a COBOL class 299 Blocks and block identifiers for C . . . . .. 332
Debugging VS COBOL II programs . . . . .. 300 Blocks and block identifiers for C++ . . . . .. 332
Finding the listing of a VS COBOL II program 300 Example: referencing variables and setting
breakpoints in C and C++ blocks . . . . . .. 333
Chapter 30. Debugging a LangX Scope and visibility of objects in C and C++
COBOL program . . . . . . . . .. 303 programs . . . . . . . . . . . . .. 333
Blocks and block identifiers in C and C++
Loading a LangX COBOL program's debug
programs . . . . . . . . . . . . .. 334
information . . . . . . . . . . . . .. 303
Displaying environmental information for C and
Debug Tool session panel while debugging a
C++ programs . . . . . . . . . . . .. 334
LangX COBOL program . . . . . . . . .. 304
Qualifying variables and changing the point of
Restrictions for debugging a LangX COBOL
view in C and C++ . . . . . . . . . .. 335
program . . . . . . . . . . . . . .. 304
Qualifying variables in C and C++ . . . .. 335
%PATHCODE values for LangX COBOL programs 306
Changing the point of view in C and C++. .. 336
Restrictions for debugging non-Language
Example: using qualification in C. . . . .. 336
Environment programs . . . . . . . . .. 306
Stepping through C++ programs . . . . . .. 338
Setting breakpoints in C++ . . . . . . . .. 338
Chapter 31. Debugging PL/I programs 307 Setting breakpoints in C++ using AT
Debug Tool subset of PL/I commands . . . .. 307 ENTRY/EXIT . . . . . . . . . . .. 338
PL/I language statements . . . . . . . .. 307 Setting breakpoints in C++ using AT CALL .. 339
%PATHCODE values for PL/I. . . . . . .. 308 Examining C++ objects . . . . . . . . .. 339
PL/I conditions and condition handling . . .. 309 Example: displaying attributes of C++ objects 339
Entering commands in PL/I DBCS freeform format 310 Monitoring storage in C++ . . . . . . . .. 340
Initializing Debug Tool for PL/I programs when Example: monitoring and modifying registers
TEST(ERROR, ...) run-time option is in effect . .. 310 and storage in C . . . . . . . . . .. 341
Debug Tool enhancements to LIST STORAGE PL/I
command . . . . . . . . . . . . .. 310
Chapter 33. Debugging an assembler
PL/I support for Debug Tool session variables .. 310
Accessing PL/I program variables . . . . .. 311 program . . . . . . . . . . . .. 343
Accessing PL/I structures . . . . . . . .. 311 The SET ASSEMBLER and SET DISASSEMBLY
Debug Tool evaluation of PL/I expressions . .. 313 commands . . . . . . . . . . . . .. 343
Supported PL/I built-in functions . . . . .. 314 Loading an assembler program's debug
Using SET WARNING PL/I command with information . . . . . . . . . . . . .. 343
built-in functions . . . . . . . . . .. 316 Debug Tool session panel while debugging an
Unsupported PL/I language elements . . . .. 316 assembler program . . . . . . . . . .. 344
Debugging OS PL/I programs. . . . . . .. 316 %PATHCODE values for assembler programs .. 345
Restrictions while debugging Enterprise PL/I Using the STANDARD and NOMACGEN view 347
programs . . . . . . . . . . . . . .. 317 Debugging non-reentrant assembler . . . . .. 347
Manipulating breakpoints in non-reentrant
assembler load modules . . . . . . . .. 348
Chapter 32. Debugging C and C++
Manipulating local variables in non-reentrant
programs . . . . . . . . . . . .. 319 assembler load modules . . . . . . . .. 348
Debug Tool commands that resemble C and C++ Restrictions for debugging an assembler program 348
commands . . . . . . . . . . . . .. 319 Restrictions for debugging a Language
Using C and C++ variables with Debug Tool . .. 320 Environment assembler MAIN program . .. 350
Accessing C and C++ program variables . .. 320 Restrictions on setting breakpoints in the
Displaying values of C and C++ variables or prologue of Language Environment assembler
expressions . . . . . . . . . . . .. 320 programs . . . . . . . . . . . . .. 350
Assigning values to C and C++ variables . .. 321 Restrictions for debugging non-Language
%PATHCODE values for C and C++ . . . .. 322 Environment programs . . . . . . . .. 350
Declaring session variables with C and C++ . .. 322 Restrictions for debugging assembler code that
C and C++ expressions . . . . . . . . .. 323 uses instructions as data. . . . . . . .. 351
Calling C and C++ functions from Debug Tool .. 324 Restrictions for debugging self-modifying
C reserved keywords . . . . . . . . . .. 325 assembler code . . . . . . . . . . .. 351
C operators and operands . . . . . . . .. 326
Contents ix
Qualifying variables . . . . . . . . .. 407 Usage notes . . . . . . . . . . . .. 432
Changing the point of view . . . . . .. 409 Debugging subtasks created by the ATTACH
Handling conditions and exceptions in Debug Tool 409 assembler macro . . . . . . . . . . .. 433
Handling conditions in Debug Tool . . . .. 410 Debugging tasks running under a generic user ID
Handling exceptions within expressions (C and by using Terminal Interface Manager . . . .. 434
C++ and PL/I only) . . . . . . . . .. 411
Debugging multilanguage applications . . . .. 411
Part 8. Appendixes . . . . . . .. 437
Debugging an application fully supported by
Language Environment . . . . . . . .. 412
Using session variables across different Appendix A. Data sets used by Debug
programming languages. . . . . . . .. 412 Tool . . . . . . . . . . . . . .. 439
Creating a commands file that can be used
across different programming languages . .. 414 Appendix B. How does Debug Tool
Coexistence with other debuggers . . . . .. 414 locate source, listing, or separate
Coexistence with unsupported HLL modules . .. 414
debug files? . . . . . . . . . . .. 445
How does Debug Tool locate source and listing
Chapter 44. Debugging multithreading files? . . . . . . . . . . . . . . .. 447
programs . . . . . . . . . . . .. 415 How does Debug Tool locate COBOL and PL/I
Restrictions when debugging multithreading separate debug file files? . . . . . . . .. 447
applications . . . . . . . . . . . . .. 415 How does Debug Tool locate EQALANGX files 448
How does Debug Tool locate the C/C++ source file
Chapter 45. Debugging across and the .dbg file? . . . . . . . . . . .. 448
multiple processes and enclaves . .. 417 How does Debug Tool locate the C/C++ .mdbg
Starting Debug Tool within an enclave . . . .. 417 file? . . . . . . . . . . . . . . .. 449
Viewing Debug Tool windows across multiple
enclaves . . . . . . . . . . . . . .. 417 Appendix C. Examples: Preparing
Ending a Debug Tool session within multiple programs and modifying setup files
enclaves . . . . . . . . . . . . . .. 418 with Debug Tool Utilities . . . . .. 451
Using Debug Tool commands within multiple Creating personal data sets . . . . . . . .. 451
enclaves . . . . . . . . . . . . . .. 418 Starting Debug Tool Utilities . . . . . . .. 452
Compiling or assembling your program by using
Chapter 46. Debugging a Debug Tool Utilities . . . . . . . . . .. 452
multiple-enclave interlanguage Modifying and using a setup file . . . . . .. 455
communication (ILC) application . .. 423 Run the program in foreground . . . . .. 455
Run the program in batch . . . . . . .. 456
Chapter 47. Debugging programs
| Appendix D. Debug Tool JCL Wizard 457
called by Java native methods . . .. 425
| Debug Tool JCL Wizard introduction . . . .. 457
| Debug Tool JCL Wizard use cases . . . . .. 458
Chapter 48. Solving problems in | Help information . . . . . . . . . .. 458
complex applications . . . . . . .. 427 | Debug a Language Environment program by
Debugging programs loaded from library lookaside | using the Terminal Interface Manager . . .. 460
(LLA) . . . . . . . . . . . . . . .. 427 | Debug a Language Environment program with
Debugging user programs that use system prefixed | the Remote GUI by using the A line command
names . . . . . . . . . . . . . . .. 427 | with a Procedure Step Override . . . . .. 465
Displaying system prefixes . . . . . . .. 428 | Debug a non-Language Environment program
Debugging programs with names similar to | by using the Terminal Interface Manager . .. 468
system components . . . . . . . . .. 428 | Debug a Language Environment DB2 program
Debugging programs containing data-only | by using the Remote GUI . . . . . . .. 472
modules . . . . . . . . . . . . . .. 428 | Debug a non-Language Environment DB2
Optimizing the debugging of large applications 429 | program by using the Remote GUI . . . .. 474
Using explicit debug mode to load debug data | Start Code Coverage without an interactive
for only specific modules . . . . . . .. 429 | Debug Tool session . . . . . . . . .. 477
Excluding specific load modules and compile | Start Code Coverage with an interactive Debug
units . . . . . . . . . . . . . .. 430 | Tool session using the Terminal Interface
Displaying current NAMES settings . . . . .. 431 | Manager . . . . . . . . . . . . .. 479
Using the EQAOPTS NAMES command to include | Debug a Language Environment VS COBOL II
or exclude the initial load module . . . . .. 431 | program compiled with the NOTEST option by
Using delay debug mode to delay starting of a | using the Terminal Interface Manager . . .. 481
debug session . . . . . . . . . . . .. 431
Contents xi
Related publications . . . . . . . . . .. 581 Index . . . . . . . . . . . . . .. 583
Softcopy publications. . . . . . . . . .. 582
Debug Tool runs on the z/OS operating system and supports the following
subsystems:
v CICS®
v DB2®
v IMS™
v JES batch
v TSO
v UNIX System Services in remote debug mode or full-screen mode using the
Terminal Interface Manager only
To use this document and debug a program written in one of the supported
languages, you need to know how to write, compile, and run such a program.
Licensed documents are available only to customers with a z/OS license. Access to
these documents requires an IBM Resource Link user ID and password, and a key
code. With your z/OS order you received a Memo to Licensees, (GI10-8928), that
includes this key code.
To obtain your IBM Resource Link user ID and password, log on to:
http://www.ibm.com/servers/resourcelink
Note: You cannot access the z/OS licensed documents unless you have registered
for access to them and received an e-mail confirmation informing you that your
request has been processed.
You can use the PDF format on either z/OS Licensed Product Library CD-ROM or
IBM Resource Link to print licensed documents.
The last several topics list notices, bibliography, and glossary of terms.
Note:
1. The PL/I program must be compiled with and run in one of the following
environments:
v Compiled with Enterprise PL/I for z/OS, Version 3.6 or later, and run with
the following versions of Language Environment:
– Language Environment Version 1.9, or later
– Language Environment Version 1.6, Version 1.7, or Version 1.8, with the
PTF for APAR PK33738 applied
v Compiled with Enterprise PL/I for z/OS, Version 3.5, with the PTFs for
APARs PK35230 and PK35489 applied and run with the following versions of
Language Environment:
– Language Environment Version 1.9, or later
– Language Environment Version 1.6, Version 1.7, or Version 1.8, with the
PTF for APAR PK33738 applied
Debug Tool provides facilities that apply only to programs compiled with specific
levels of compilers. Because of this, Debug Tool User's Guide uses the following
terms:
assembler
Refers to assembler programs with debug information assembled by using
the High Level Assembler (HLASM).
COBOL
Refers to the all COBOL compilers supported by Debug Tool except the
COBOL compilers described in the term LangX COBOL.
Disassembly or disassembled
Refers to high-level language programs compiled without debug
Syntax diagrams pictorially display the order and parts (options and arguments)
that comprise a command statement. They are read from left to right and from top
to bottom, following the main path of the horizontal line.
Symbols
The following symbols may be displayed in syntax diagrams:
Symbol
Definition
►►─── Indicates the beginning of the syntax diagram.
───► Indicates that the syntax diagram is continued to the next line.
►─── Indicates that the syntax is continued from the previous line.
Syntax items
Syntax diagrams contain many different items. Syntax items include:
v Keywords - a command name or any other literal information.
v Variables - variables are italicized, appear in lowercase and represent the name
of values you can supply.
v Delimiters - delimiters indicate the start or end of keywords, variables, or
operators. For example, a left parenthesis is a delimiter.
v Operators - operators include add (+), subtract (-), multiply (*), divide (/), equal
(=), and other mathematical operations that may need to be performed.
v Fragment references - a part of a syntax diagram, separated from the diagram to
show greater detail.
v Separators - a separator separates keywords, variables or operators. For example,
a comma (,) is a separator.
Syntax examples
The following table provides syntax examples.
Table 1. Syntax examples
Item Syntax example
Required item.
►► KEYWORD required_item ►◄
Required items appear on the main path of the horizontal
line. You must specify these items.
Required choice.
►► KEYWORD required_choice1 ►◄
A required choice (two or more items) appears in a required_choice2
vertical stack on the main path of the horizontal line. You
must choose one of the items in the stack.
Optional item.
►► KEYWORD ►◄
Optional items appear below the main path of the optional_item
horizontal line.
Optional choice.
►► KEYWORD ►◄
An optional choice (two or more items) appears in a optional_choice1
vertical stack below the main path of the horizontal line. optional_choice2
You may choose one of the items in the stack.
You can use Debug Tool to debug your programs in batch mode, interactively in
full-screen mode, or in remote debug mode.
Table 2 maps out the Debug Tool interfaces and compilers or assemblers each
interface supports.
Table 2. Debug Tool interface type by compiler or assembler
Full- Remote
Batch screen debug
Compiler or assembler mode mode mode
1
OS/VS COBOL, Version 1 Release 2.4 (with limitations) X X
VS COBOL II Version 1 Release 3 and Version 1 Release 4 (with limitations; for X X X
programs compiled with the TEST compiler option and linked with the Language
Environment library.)
VS COBOL II Version 1 Release 3 and Version 1 Release 4 (with limitations; for X X
programs compiled with the NOTEST compiler option and linked with a
non-Language Environment library.) 1
VS COBOL II Version 1 Release 3 and Version 1 Release 4 (with limitations; for X X
programs compiled with the NOTEST compiler option and linked with the Language
Environment library.) 1
AD/Cycle COBOL/370 Version 1 Release 1 X X
COBOL for MVS™ & VM X X X
COBOL for OS/390 & VM X X X
Enterprise COBOL for z/OS and OS/390 compiled with the TEST compiler option X X X
1
Enterprise COBOL for z/OS and OS/390 compiled with the NOTEST compiler option X X
Enterprise COBOL for z/OS compiled with the TEST compiler option X X X
1
Enterprise COBOL for z/OS V3 and V4 compiled with the NOTEST compiler option X X X
OS PL/I Version 2 Release 1, Version 2 Release 2, and Version 2 Release 3 (with X X
limitations)
PL/I for MVS & VM X X
Enterprise PL/I for z/OS and OS/390 compiled with the TEST compiler option X X X
Enterprise PL/I for z/OS compiled with the NOTEST compiler option X X
™
AD/Cycle C/370 Version 1 Release 2 X X
C/C++ for MVS/ESA Version 3 Release 2 X X
C/C++ feature of OS/390 Version 1 Release 3 and earlier X X
C/C++ feature of OS/390 Version 2 Release 10 and later X X X
C/C++ feature of z/OS X X X
1. See Chapter 5, “Preparing a LangX COBOL program,” on page 71 for information about how to prepare a
program of this type.
Table 3 maps out the Debug Tool interfaces and subsystems each interface
supports.
Table 3. Debug Tool interface type by subsystem
Full-screen
mode using
the Terminal Remote
Batch Full-screen Interface debug
Subsystem mode mode Manager mode
TSO X X X X
JES batch X X X
UNIX System Services X X
1
CICS X X
DB2 X X X X
DB2 stored procedures X X
IMS TM X X
IMS batch X X X
IMS BTS X X X
Airline Control System (ALCS) X2
1
You can use 3 different ways to debug CICS programs in full-screen mode:
single terminal mode, screen control mode, and separate terminal mode.
2
Only for C and C++ programs.
Refer to the following topics for more information related to the material discussed
in this topic.
Related concepts
“Debug Tool interfaces”
Related tasks
Chapter 3, “Planning your debug session,” on page 23
Chapter 20, “Using full-screen mode: overview,” on page 157
Related references
Debug Tool Reference and Messages
The term "batch mode" debugging refers to this debugging method, which is
controlled by a predefined script. Note that batch mode debugging is not limited
to debugging batch programs. Batch mode can be used with any type of
application supported by Debug Tool, including online applications running under
CICS, IMS/TM, or TSO.
Full-screen mode
Debug Tool provides an interactive full-screen interface on a 3270 device, with
debugging information displayed in three windows:
v A Source window in which to view your program source or listing
v A Log window, which records commands and other interactions between Debug
Tool and your program
v A Monitor window in which to monitor changes in your program
You can debug all languages supported by Debug Tool in full-screen mode.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Debug Tool Customization Guide
The Terminal Interface Manager (TIM) is a component of Debug Tool that provides
communication between the debugger, which controls an application program as it
runs, and a terminal session where you interact with the debugger. To use the TIM
you connect a 3270 terminal session to the TIM.
The debugger displays on that terminal session in full-screen mode and accepts
your commands. You can connect to the TIM from a dedicated 3270 terminal
session, for example, a terminal emulator session configured to connect to it.
Optionally, you can access the TIM from VTAM® session manager software.
Debug Tool can work with a remote debugger to provide you with the ability to
debug host programs, including batch programs, through a graphical user interface
(GUI) on the workstation. Debug Tool works with the following remote debuggers:
v IBM Problem Determination Tools Studio
To learn more about IBM Problem Determination Tools Studio, see “IBM
Problem Determination Tools Studio” (www.ibm.com/support/
docview.wss?uid=swg24033230).
v IBM Problem Determination Tools Plug-ins V13 Combined Packages
To learn more about and download IBM Problem Determination Tools Plug-ins
V13 Combined Packages, see “IBM Problem Determination Tools Plug-ins V13
Combined Packages” (www.ibm.com/support/docview.wss?uid=swg24033351).
v Compiled Language Debugger component of Rational Developer for System z®
To learn how to use the Compiled Language Debugger component of Rational
Developer for System z, see “Compiled language debugger” in the online help
for Rational® Developer for System z (http://publib.boulder.ibm.com/
infocenter/ratdevz/v8r5/topic/com.ibm.debug.pdt.doc/topics/cbpovrvw.html).
You can enter some Debug Tool commands through the remote debugger's Debug
Console. For a list of Debug Tool commands that you can enter, see “Debug Tool
commands supported in remote debug mode” in the Debug Tool Reference and
Messages.
The IBM Debug Tool DTCN and DTSP Profile Manager plug-in can make it more
convenient to work in remote debug mode. The plug-in adds the following views
to the Debug perspective of the remote debugger:
v The DTCN Profiles view, which helps you create and manage DTCN profiles
for CICS.
v The DTSP Profile view, which helps you create and manage the TEST runtime
options data set (EQAUOPTS).
To learn how to install and configure these plug-ins, see Appendix K, “Installing
the IBM Debug Tool plug-ins,” on page 545.
Each topic directs you to other topics that provide more information.
See Chapter 3, “Planning your debug session,” on page 23 for instructions on how
to choose the correct combination of compiler options and suboptions to use for
your situation.
In this topic, we describe the simplest and most direct method to start Debug Tool
for a program that runs in Language Environment in TSO. At a TSO READY
prompt, enter the following command:
CALL ’USERID1.MYLIB(MYPROGRAM)’ ’/TEST’
Place the slash (/) before or after the TEST runtime option, depending on the
programming language you are debugging.
The following topics can give you more information about other methods of
starting Debug Tool:
v Chapter 13, “Starting Debug Tool from the Debug Tool Utilities,” on page 123
v Chapter 12, “Writing the TEST run-time option string,” on page 117
v “Starting Debug Tool with CEETEST” on page 127
v “Starting Debug Tool with PLITEST” on page 134
v “Starting Debug Tool with the __ctest() function” on page 135
v “Starting Debug Tool for programs that start in Language Environment” on page
141
v Chapter 15, “Starting Debug Tool in batch mode,” on page 137
v “Starting Debug Tool for programs that start outside of Language Environment”
on page 143
v “Starting Debug Tool under CICS by using DTCN” on page 148
v “Starting Debug Tool for CICS programs by using CADP” on page 149
v “Starting Debug Tool under CICS by using CEEUOPT” on page 150
v “Starting Debug Tool under CICS by using compiler directives” on page 150
The default screen is divided into four sections: the session panel header and three
physical windows. The sessional panel header is the top two lines of the screen,
which display the header fields and a command line. The header fields describe
the programming language and the location in the program. The command line is
where you enter Debug Tool commands.
A physical window is the space on the screen dedicated to the display of a specific
type of debugging information. The debugging information is organized into the
following types, called logical windows:
Monitor window
Variables and their values, which you can display by entering the SET
AUTOMONITOR ON and MONITOR commands.
Source window
The source or listing file, which Debug Tool finds or you can specify where
to find it.
Log window
The record of your interactions with Debug Tool and the results of those
interactions.
Memory window
A section of memory, which you can display by entering the MEMORY
command.
The default screen displays three physical windows, with one assigned the Monitor
window, the second assigned the Source window, and the third assigned the Log
window. You can swap the Memory window with the Log window.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Stepping through or running your program” on page 188
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Debug Tool Reference and Messages
Setting a breakpoint
In Debug Tool, breakpoints can indicate a stopping point in your program and a
stopping point in time. Breakpoints can also contain activities, such as instructions
to run, calculations to perform, and changes to make.
In the Log window, the message AT 100 ; appears. If line 100 is not a valid place
to set a breakpoint, the Log window displays a message similar to Statement 100
is not valid. The breakpoint is also indicated in the Source window by a
reversing of the colors in the prefix area.
Breakpoints do more than just indicate a place to stop. Breakpoints can also
contain instructions. For example, the following breakpoint instructs Debug Tool to
display the contents of the variable myvar when Debug Tool reaches line 100:
AT 100 LIST myvar;
A breakpoint can contain instructions that alter the flow of the program. For
example, the following breakpoint instructs Debug Tool to go to label newPlace
when it reaches line 100:
AT 100 GOTO newPlace ;
A breakpoint can contain a condition, which means that Debug Tool stops at the
breakpoint only if the condition is met. For example, to stop at line 100 only when
the value of myvar is greater than 10, enter the following command:
AT 100 WHEN myvar > 10;
The syntax of the complex instruction depends on the program language that you
are debugging. The previous example assumes that you are debugging a C
program. If you are debugging a COBOL program, the same example is written as
follows:
AT 100 if mybool = TRUE THEN myvar = 10 ; END-IF ;
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Debug Tool Reference and Messages
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
16 Debug Tool V13.1 User's Guide
“Displaying values of C and C++ variables or expressions” on page 320
“Displaying values of COBOL variables” on page 292
“Displaying and monitoring the value of a variable” on page 196
Related references
“Monitor window” on page 161
Description of the MONITOR COMMAND in Debug Tool Reference and Messages
Description of the SET AUTOMONITOR COMMAND in Debug Tool Reference
and Messages
The Memory window is not displayed in the default screen. To display the
Memory window, use the WINDOW SWAP MEMORY LOG command. Debug Tool displays
the Memory window in the location of the Log window.
After you display the Memory window, you can navigate through it using the
SCROLL DOWN and SCROLL UP commands. You can modify the contents of memory by
typing the new values in the hexadecimal data area.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 27, “Customizing your full-screen session,” on page 273
“Displaying the Memory window” on page 181
“Displaying and modifying memory through the Memory window” on page
206
“Scrolling through the physical windows” on page 176
Related references
“Debug Tool session panel” on page 157
WINDOW SWAP command in Debug Tool Reference and Messages
Changing the value of a variable depends on the programming language that you
are debugging. In Debug Tool, the rules and methods for the assignment of values
to variables are the same as programming language rules and methods. For
example, to assign a value to a C variable, use the C assignment rules and
methods:
var = 1 ;
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Assigning values to C and C++ variables” on page 321
“Assigning values to COBOL variables” on page 291
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Description of the DISABLE command in Debug Tool Reference and Messages
Description of the ENABLE command in Debug Tool Reference and Messages
Clearing a breakpoint
When you no longer require a breakpoint, you can clear it. Clearing it removes any
of the instructions associated with that breakpoint. For example, to clear a
breakpoint on line 100 of your program, enter the following command on the
command line:
CLEAR AT 100
The Log window displays a line that says CLEAR AT 100 ; and the prefix area
reverts to its original colors. These changes indicate that the breakpoint at line 100
is gone.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Description of the CLEAR command in Debug Tool Reference and Messages
PLAYBACK BACKWARD and PLAYBACK FORWARD change the direction commands like
STEP move in.
When you have finished replaying statements, enter the PLAYBACK STOP command.
Debug Tool returns you to the point at which you entered the PLAYBACK START
command. You can resume normal debugging. Debug Tool continues to record
your statements. To replay a new set of statements, begin at step 1.
When you finish recording and replaying statements, enter the following
command:
PLAYBACK DISABLE
Debug Tool no longer records any statements and discards information that you
recorded. The PLAYBACK START, PLAYBACK FORWARD, PLAYBACK BACKWARD, and PLAYBACK
STOP commands are no longer available.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Description of the PLAYBACK commands in Debug Tool Reference and Messages
Refer to Debug Tool Reference and Messages for more information about the QQUIT,
QUIT ABEND and QUIT DEBUG commands which can stop your debug session.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Description of the QUIT command in Debug Tool Reference and Messages
Description of the QQUIT command in Debug Tool Reference and Messages
After you have completed these tasks, use the information you collected to follow
the instructions in Chapter 4, “Updating your processes so you can debug
programs with Debug Tool,” on page 61.
To learn more about how hooks and symbol tables help Debug Tool debug your
program, read the following topics:
v “Understanding how hooks work and why you need them” on page 48
v “Understanding what symbol tables do and why saving them elsewhere can
make your application smaller” on page 49
To learn more about how the compiler options affect Debug Tool functionality, read
the following topics:
v “Choosing TEST or NOTEST compiler suboptions for COBOL programs” on
page 27
v “Choosing TEST or NOTEST compiler suboptions for PL/I programs” on page
33
v “Choosing TEST or DEBUG compiler suboptions for C programs” on page 39
v “Choosing DEBUG compiler suboptions for C programs” on page 39
v “Choosing TEST or NOTEST compiler suboptions for C programs” on page 41
v “Choosing DEBUG compiler suboptions for C++ programs” on page 44
v “Choosing TEST or DEBUG compiler suboptions for C++ programs” on page 44
v “Choosing TEST or NOTEST compiler options for C++ programs” on page 46
______________________________________________________________
VS COBOL II Version 1 Release 3 and Version 1 Release 4 (for programs compiled with the TEST compiler option and linked TEST or
with the Language Environment library.)
______________________________________________________________
VS COBOL II Version 1 Release 3 and Version 1 Release 4 (for programs compiled with the NOTEST compiler option and linked NOTEST,NOOPTIMIZE,SOURCE,MAP,XREF,LIST(or OFFSET) or
with a non-Language Environment library.) 1
______________________________________________________________
VS COBOL II Version 1 Release 3 and Version 1 Release 4 (for programs compiled with the NOTEST compiler option and linked NOTEST,NOOPTIMIZE,SOURCE,MAP,XREF,LIST(or OFFSET) or
with the Language Environment library.) 1
______________________________________________________________
AD/Cycle COBOL/370 Version 1 Release 1 TEST(ALL,SYM) or
______________________________________________________________
COBOL for MVS & VM TEST(ALL,SYM) or
______________________________________________________________
COBOL for OS/390 & VM TEST(NONE,SYM,SEPARATE) or
______________________________________________________________
Enterprise COBOL for z/OS and OS/390, Version 3 TEST(NONE,SYM,SEPARATE) or
__________________________
1
Enterprise COBOL for z/OS Version 3 or Version 4 compiled with the NOTEST compiler option NOTEST,NOOPTIMIZE,SOURCE,MAP,XREF,LIST(or OFFSET) or
______________________________________________________________
Enterprise COBOL for z/OS Version 4 compiled with the TEST compiler option TEST(NOHOOK,SEPARATE,EJPD) or
______________________________________________________________
Enterprise COBOL for z/OS Version 5 compiled with the TEST compiler option TEST(EJPD,SOURCE) or
______________________________________________________________
OS PL/I Version 2 Release 1, Version 2 Release 2, and Version 2 Release 3 TEST(ALL,SYM) or
______________________________________________________________
PL/I for MVS & VM TEST(ALL,SYM) or
______________________________________________________________
Enterprise PL/I, Version 3.1 through Version 3.3 TEST(ALL,SYM) or
______________________________________________________________
Enterprise PL/I, Version 3.4 TEST(ALL,NOHOOK,SYM) or
25
Table 5. Record the compiler options you need to use in this table. The options you use work with Debug Tool for z/OS, Version 13.1 or later. (continued)
26
Compiler or assembler Compiler options you will use
Enterprise PL/I, Version 3.5 or later TEST(ALL,NOHOOK,SYM,SEPARATE) or
______________________________________________________________
Enterprise PL/I, Version 3.7 TEST(ALL,NOHOOK,SYM,SEPARATE,SOURCE) or
______________________________________________________________
Enterprise PL/I, Version 3.8 or later TEST(ALL,NOHOOK,SYM,SEPARATE) and LISTVIEW or
______________________________________________________________
Enterprise PL/I, Version 4 or later TEST(ALL,NOHOOK,SYM,SEPARATE) and LISTVIEW and GONUMBER(SEPARATE) or
______________________________________________________________
IBM High Level Assembler (HLASM), Version 1 Release 4, Version 1 Release 5, Version 1 Release 6 ADATA
1. See Chapter 5, “Preparing a LangX COBOL program,” on page 71 for information on how to prepare a program of this type.
Choosing TEST or NOTEST compiler suboptions for COBOL
programs
This topic describes the combination of TEST compiler option and suboptions you
need to specify to obtain the wanted debugging scenario. This topic assumes you
are compiling your COBOL program with Enterprise COBOL for z/OS, Version 3.4,
or later; however, the topics provide information about alternatives to use for older
versions of the COBOL compiler.
The COBOL compiler provides the TEST compiler option and its suboptions to
control the following actions:
v The generation and placement of hooks and symbol tables.
v The placement of debug information into the object file or a separate debug file.
The following instructions help you choose the combination of TEST compiler
suboptions that provide the functionality you need to debug your program:
1. Choose a debugging scenario, keeping in mind your site's resources, from the
following list:
v Scenario A: If you are compiling with Enterprise COBOL for z/OS, Version 4,
you can get the most Debug Tool functionality and a small program size by
using TEST(NOHOOK,SEPARATE). If you need to debug programs that are
loaded into protected storage, verify that your site installed the Authorized
Debug Facility.
If you want to compile your program with the OPT(STD) or OPT(FULL)
compiler option, you must also specify the EJPD suboption of the TEST
compiler option to be able to do the following tasks:
– Use the GOTO or JUMPTO commands.
– Modify variables with predictable results.
When you use the EJPD suboption, you might lose some optimization.
If you are using other Problem Determination Tools, review the information
in IBM Problem Determination Tools for z/OS Common Component: Customization
Guide and User Guide to make sure you specify all the compiler options you
need to create the files needed by all the Problem Determination Tools.
v Scenario B: If you are compiling with any of the following compilers, you
can get the most Debug Tool functionality and a small program size by using
TEST(NONE,SYM,SEPARATE):
– Enterprise COBOL for z/OS and OS/390, Version 3 Release 2 or later
– Enterprise COBOL for z/OS and OS/390, Version 3 Release 1 with APAR
PQ63235
– COBOL for OS/390 & VM, Version 2 Release 2
– COBOL for OS/390 & VM, Version 2 Release 1 with APAR PQ63234.
If you need to debug programs that are loaded into protected storage, verify
that your site installed the Authorized Debug Facility.
If you want to compile your program with optimization and be able to get
the most Debug Tool functionality, you must compile it with one of the
following combination of compiler options:
– OPT(STD) TEST(NONE,SYM)
– OPT(STD) TEST(NONE,SYM,SEPARATE)
– OPT(FULL) TEST(NONE,SYM)
– OPT(FULL) TEST(NONE,SYM,SEPARATE)
After you have chosen the compiler options and suboptions, see Chapter 3,
“Planning your debug session,” on page 23 to determine the next task you must
complete.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Description of the TEST compiler option in Enterprise COBOL for z/OS
Programming Guide
The following table explains the effects of the NOTEST compiler option, the TEST
compiler option, and some of the suboptions of the TEST compiler option on
Debug Tool behavior or the availability of features, which are not described in
Enterprise COBOL for z/OS Programming Guide:
Table 6. Description of the effects that the COBOL NOTEST compiler option and some of
the TEST compiler suboptions have on Debug Tool.
Name of compiler
option or suboption Description of the effect
NOTEST v You cannot step through program statements.
v You can suspend execution of the program only at the
initialization of the main compile unit.
v You can include calls to CEETEST in your program to allow you
to suspend program execution and issue Debug Tool commands.
v You cannot examine or use any program variables.
v You can list storage and registers.
v The source listing produced by the compiler cannot be used;
therefore, no listing is available during a debug session. Using
the SET DEFAULT LISTINGS command cannot make a listing
available.
v Because a statement table is not available, you cannot set any
statement breakpoints or use commands such as GOTO or QUERY
location.
However, you can still debug your program using the disassembly
view. To learn how to use the disassembly view, see Chapter 34,
“Debugging a disassembled program,” on page 355.
The PL/I compiler provides the TEST compiler option and its suboptions to control
the following actions:
v The generation and placement of hooks and symbol tables.
v The placement of debug information into the object file or separate debug file.
The following instructions help you choose the combination of TEST compiler
suboptions that provide the functionality you need to debug your program:
1. Choose a debugging scenario, keeping in mind your site's resources, from the
following list:
v Scenario A: If you are using Enterprise PL/I for z/OS, Version 3.8 or later,
and you want to get the most Debug Tool functionality and a small program
size, use TEST(ALL,NOHOOK,SYM,SEPARATE) and the LISTVIEW(SOURCE) compiler
option. If you need to debug programs that are loaded into protected
storage, verify that your site installed the Authorized Debug Facility.
Consider the following options:
– If you are using Enterprise PL/I for z/OS, Version 4 or later, you can
specify the GONUMBER(SEPARATE) compiler option, which can help make the
program size smaller. You must install the PTF for APAR PM19445 on
Language Environment, Version 1.10 to Version 1.12.
– You can specify any of the LISTVIEW sub-options (SOURCE, AFTERALL,
AFTERCICS, AFTERMACRO, or AFTERSQL), as described in Enterprise PL/I for
z/OS Programming Guide, to display either the original source or the source
after the specified preprocessor.
– If you are debugging in full-screen mode and you want to debug
programs with INCLUDE files that have executable code, specify the
LISTVIEW(AFTERMACRO) compiler option and, if you do not specify the
MACRO compiler option, specify the PP(MACRO(INCONLY)) compiler option.
– If you are debugging in remote debug mode and you want to automonitor
variables in INCLUDE files, specify the LISTVIEW(AFTERMACRO) compiler
option and, if you do not specify the MACRO compiler option, specify the
PP(MACRO(INCONLY)) compiler option.
If you are using other Problem Determination Tools, see topic Enterprise PL/I
Version 3.5 and Version 3.6 programs in IBM Problem Determination Tools for
z/OS Common Component: Customization Guide and User Guide to make sure
you specify all the compiler options you need to create the files needed by
all the Problem Determination Tools.
v Scenario B: If you are using Enterprise PL/I for z/OS, Version 3.7, and you
want to get the most Debug Tool functionality and a small program size, use
TEST(ALL,NOHOOK,SYM,SEPARATE,SOURCE). If you need to debug programs that
are loaded into protected storage, verify that your site installed the
Authorized Debug Facility.
Consider the following options:
– You can substitute SOURCE with AFTERALL, AFTERCICS, AFTERMACRO, or
AFTERSQL, as described in Enterprise PL/I for z/OS Programming Guide.
– If you are debugging in full-screen mode and you want to debug
programs with INCLUDE files that have executable code, specify the
TEST(ALL,NOHOOK,SYM,SEPARATE,AFTERMACRO) compiler options and, if you
do not specify the MACRO compiler option, specify the PP(MACRO(INCONLY))
compiler option.
– If you are debugging in remote debug mode and you want to automonitor
variables in INCLUDE files, specify the
TEST(ALL,NOHOOK,SYM,SEPARATE,AFTERMACRO) compiler options and, if you
do not specify the MACRO compiler option, specify the PP(MACRO(INCONLY))
compiler option.
After you have chosen the compiler options and suboptions, see Chapter 3,
“Planning your debug session,” on page 23 to determine the next task you must
complete.
Table 7. Description of the effects that the PL/I NOTEST compiler option and the TEST
compiler suboptions have on Debug Tool.
Name of compiler
option or suboption Description of the effect
NOTEST
Some behaviors or features change when you debug a PL/I
program compiled with the NOTEST compiler option. The following
list describes these changes:
v You can list storage and registers.
v You can include calls to PLITEST or CEETEST in your program
so you can suspend running your program and issue Debug
Tool commands.
v You cannot step through program statements. You can suspend
running your program only at the initialization of the main
compile unit.
v You cannot examine or use any program variables.
v Because hooks at the statement level are not inserted, you
cannot set any statement breakpoints or use commands such as
GOTO or QUERY LOCATION.
v The source listing produced by the compiler cannot be used;
therefore, no listing is available during a debug session.
However, you can still debug your program using the disassembly
view. To learn how to use the disassembly view, see Chapter 34,
“Debugging a disassembled program,” on page 355.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Description of the TEST compiler option in Enterprise PL/I for z/OS Programming
Guide.
The C/C++ compiler option DEBUG was introduced with z/OS C/C++ Version 1.5.
Debug Tool supports the DEBUG compiler option in z/OS C/C++ Version 1.6 or
later. The DEBUG compiler option replaces the TEST compiler option that was
available with previous versions of the compiler.
If you are compiling with z/OS C/C++, Version 1.6 or later, choose the DEBUG
compiler option and take advantage of the following benefits:
v For C++ programs, you can specify the HOOK(NOBLOCK) compiler option, which
can improve debug performance.
v For C and C++ programs, if you specify the FORMAT(DWARF) suboption of the
DEBUG compiler option, the load modules are smaller; however, you must save
the .dbg file in addition to the source file. Debug Tool needs both of these files
to debug your program.
v For C and C++ programs compiled with z/OS XL C/C++, Version 1.10 or later,
if you specify the FORMAT(DWARF) suboption of the DEBUG compiler option, the
load modules are smaller and you can create .mdbg files with captured source.
Debug Tool needs only the .mdbg file to debug your program.
The C compiler provides the DEBUG compiler option and its suboptions to control
the following actions:
v The generation and placement of hooks and symbol tables.
v The placement of debug information into the object file or separate debug file.
Debug Tool does not support debugging optimized C programs. Do not use any
OPTIMIZE compiler options other than NOOPTIMIZE or OPTIMIZE(0).
The following instructions help you choose the combination of DEBUG compiler
suboptions that provide the functionality you need to debug your program:
1. Choose a debugging scenario, keeping in mind your site's resources, from the
following list:
v Scenario A: To get the most Debug Tool functionality, a smaller program size,
and better performance, use one of the following combinations:
DEBUG(FORMAT(DWARF),HOOK(LINE,NOBLOCK,PATH),SYMBOL,FILE(file_location))
The compiler options are the same whether you use only .dbg files or also
use .mdbg files.
1. In situations where you can specify environment variables, you can set the environment variable EQA_USE_MDBG to YES or
NO, which overrides any setting (including the default setting) of the EQAOPTS MDBG command.
2. In situations where you can specify environment variables, you can set the environment variable EQA_USE_MDBG to YES or
NO, which overrides any setting (including the default setting) of the EQAOPTS MDBG command.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Description of the DEBUG compiler option in z/OS XL C/C++ User's Guide
The C compiler provides the TEST compiler option and its suboptions to control the
generation and placement of hooks and symbol tables.
Debug Tool does not support debugging optimized C programs. Do not use
compiler options other than NOOPTIMIZE,
The following instructions help you choose the combination of TEST compiler
suboptions that provide the functionality you need to debug your program:
1. Choose a debugging scenario, keeping in mind your site's resources, from the
following list:
v Scenario A: To get all Debug Tool functionality but have a larger program
size (compared to using DEBUG(FORMAT(DWARF))), use TEST(ALL,HOOK,SYMBOL).
v Scenario B: You can get some Debug Tool functionality by compiling with the
NOTEST compiler option. This requires that you debug your program in
disassembly mode.
v Scenario C: If you are debugging programs running in ALCS, you must
compile with the HOOK suboption of the TEST compiler option.
For all scenarios, if you are using other Problem Determination Tools, see topic
z/OS XL C and C++ programs in IBM Problem Determination Tools for z/OS
Common Component: Customization Guide and User Guide to make sure you
specify all the compiler options you need to create the files needed by all the
Problem Determination Tools.
2. For scenario B, do the following steps:
a. If you are running on z/OS Version 1.6 or Version 1.7, verify that Language
Environment PTF for APAR PK12833 is installed.
b. If you use the Dynamic Debug facility to place hooks into programs that
reside in read-only storage, verify with your system administrator that the
Authorized Debug facility has been installed and that you are authorized to
use it.
c. After you start Debug Tool, verify that you have not deactivated the
Dynamic Debug facility by entering the SET DYNDEBUG OFF command.
3. Verify whether you need to do any of the following tasks:
v
When you compile a program, do not associate SYSIN with an in-stream
data set (for example //SYSIN DD *) because Debug Tool requires access to
a permanent data set for the source of the program you are debugging.
v If you are using #pragma statements to specify your TEST or NOTEST compiler
options, see “Compiling your C program with the #pragma statement” on
page 43.
v The C TEST compiler option implicitly specifies the GONUMBER compiler option,
which causes the compiler to generate line number tables that correspond to
the input source file. You can explicitly remove this option by specifying
Chapter 3. Planning your debug session 41
NOGONUMBER. When the TEST and NOGONUMBER options are specified together,
Debug Tool does not display the current execution line as you step through
your code.
v Programs that are compiled with both the TEST compiler option and either
the OPT(1) or OPT(2) compiler option do not have hooks at line, block, and
path points, or generate a symbol table, regardless of the TEST suboptions
specified. Only hooks for function entry and exit points are generated for
optimized programs.
v You can specify any number of TEST suboptions, including conflicting
suboptions (for example, both PATH and NOPATH). The last suboptions that are
specified take effect. For example, if you specify TEST(BLOCK, NOBLOCK,
BLOCK, NOLINE, LINE), what takes effect is TEST(BLOCK, LINE) because BLOCK
and LINE are specified last.
v No duplicate hooks are generated even if two similar TEST suboptions are
specified. For example, if you specify TEST(BLOCK, PATH), the BLOCK
suboption causes the generation of hooks at entry and exit points. The PATH
suboption also causes the generation of hooks at entry and exit points.
However, only one hook is generated at each entry and exit point.
Table 8. Description of the effects that the C NOTEST compiler option and the TEST
compiler suboptions have on Debug Tool.
Name of compiler
option or suboption Description of the effect
NOTEST
The following list explains the effect the NOTEST compiler option
will have on how Debug Tool behaves or the availability of
features, which are not described in z/OS XL C/C++ User's Guide:
v You cannot step through program statements. You can suspend
execution of the program only at the initialization of the main
compile unit.
v You cannot examine or use any program variables.
v You can list storage and registers.
v You cannot use the Debug Tool command GOTO.
However, you can still debug your program using the disassembly
view. To learn how to use the disassembly view, see Chapter 34,
“Debugging a disassembled program,” on page 355.
TEST
The following list explains the effect some of the suboptions of the
TEST compiler option will have on how Debug Tool behaves or
the availability of features, which are not described in z/OS XL
C/C++ User's Guide:
v The maximum number of lines in a single source file cannot
exceed 131,072.
v The maximum number of include files that have executable
statements cannot exceed 1024.
NOSYM
The following list explains the effect the NOSYM suboption of the
TEST compiler option will have on how Debug Tool behaves or the
availability of features, which are not described in z/OS XL C/C++
User's Guide.
v You cannot reference program variables by name.
v You cannot use commands such as LIST or DESCRIBE to access a
variable or expression.
v You cannot use commands such as CALL or GOTO to branch to
another label (paragraph or section name).
This #pragma must appear before any executable code in your program.
The following example generates symbol table information, symbol information for
nested blocks, and hooks at line numbers:
#pragma options (test(SYM,BLOCK,LINE))
Usage notes:
v The FUNCEVENT(ENTRYCALL) compiler option is available in the z/OS 2.1 XL
C/C++ compiler with the PTF for APAR PI19326 applied.
v The z/OS 2.1 Language Environment with the PTF for APAR PI12415 applied
must be available on the target system where the C programs are executed.
v If your C application runs on UNIX System Services with imported functions
from a DLL module and you want to delay the starting of a debug session until
one of those functions is called, the DLL module name must be the same as the
load library name.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
z/OS XL C/C++ User's Guide
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
z/OS XL C/C++ User's Guide
The C/C++ compiler option DEBUG was introduced with z/OS C/C++ Version 1.5.
Debug Tool supports the DEBUG compiler option in z/OS C/C++ Version 1.6 or
later. The DEBUG compiler option replaces the TEST compiler option that was
available with previous versions of the compiler.
If you are compiling with z/OS C/C++, Version 1.6 or later, choose the DEBUG
compiler option and take advantage of the following benefits:
v For C++ programs, you can specify the HOOK(NOBLOCK) compiler option, which
can improve debug performance.
v For C and C++ programs, if you specify the FORMAT(DWARF) suboption of the
DEBUG compiler option, the load modules are smaller; however, you must save
the .dbg file in addition to the source file. Debug Tool needs both of these files
to debug your program.
v For C and C++ programs compiled with z/OS XL C/C++, Version 1.10 or later,
if you specify the FORMAT(DWARF) suboption of the DEBUG compiler option, the
load modules are smaller and you can create .mdbg files with captured source.
Debug Tool needs only the .mdbg file to debug your program.
The C++ compiler provides the DEBUG compiler option and its suboptions to control
the following actions:
v The generation and placement of hooks and symbol tables.
v The placement of debug information into the object file or separate debug file.
Debug Tool does not support debugging optimized C programs. Do not use any
OPTIMIZE compiler options other than NOOPTIMIZE or OPTIMIZE(0).
3. In situations where you can specify environment variables, you can set the environment variable EQA_USE_MDBG to YES or
NO, which overrides any setting (including the default setting) of the EQAOPTS MDBG command.
4. In situations where you can specify environment variables, you can set the environment variable EQA_USE_MDBG to YES or
NO, which overrides any setting (including the default setting) of the EQAOPTS MDBG command.
After you have chosen the compiler options and suboptions, see Chapter 3,
“Planning your debug session,” on page 23 to determine the next task you must
complete.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Description of the DEBUG compiler option in z/OS XL C/C++ User's Guide
The C++ compiler provides the TEST compiler option and its suboptions to control
the generation and placement of hooks and symbol tables.
Debug Tool does not support debugging optimized C++ programs. Do not use
compiler options other than NOOPTIMIZE,
The following instructions help you choose the combination of TEST compiler
suboptions that provide the functionality you need to debug your program:
1. Choose a debugging scenario, keeping in mind your site's resources, from the
following list:
v Scenario A: To get all Debug Tool functionality but have a larger program
size (compared to using DEBUG(FORMAT(DWARF))), use TEST.
v Scenario B: You can get some Debug Tool functionality by compiling with the
NOTEST compiler option. This requires that you debug your program in
disassembly mode.
v Scenario C: If you are debugging programs running in ALCS, you must
compile with the HOOK suboption of the TEST compiler option.
For all scenarios, if you are using other Problem Determination Tools, see IBM
Problem Determination Tools for z/OS Common Component: Customization Guide and
User Guide to make sure you specify all the compiler options you need to create
the files needed by all the Problem Determination Tools.
2. Verify whether you need to do any of the following tasks:
v
When you compile a program, do not associate SYSIN with an in-stream
data set (for example //SYSIN DD *) because Debug Tool requires access to
a permanent data set for the source of the program you are debugging.
v The C++ TEST compiler option implicitly specifies the GONUMBER compiler
option, which causes the compiler to generate line number tables that
correspond to the input source file. You can explicitly remove this option by
After you have chosen the compiler options and suboptions, see Chapter 3,
“Planning your debug session,” on page 23 to determine the next task you must
complete.
Table 9. Description of the effects that the C++ NOTEST and TEST compiler option have on
Debug Tool.
Name of compiler
option or suboption Description of the effect
NOTEST
The following list explains the effect of the NOTEST compiler has on
Debug Tool behavior, which are not described in z/OS XL C/C++
User's Guide:
v You cannot step through program statements. You can suspend
execution of the program only at the initialization of the main
compile unit.
v You cannot examine or use any program variables.
v You can list storage and registers.
v You cannot use the Debug Tool command GOTO.
However, you can still debug your program using the disassembly
view. To learn how to use the disassembly view, see Chapter 34,
“Debugging a disassembled program,” on page 355.
TEST
The following list explains the effect the TEST compiler has on
Debug Tool behavior, which are not described in z/OS XL C/C++
User's Guide:
v The maximum number of lines in a single source file cannot
exceed 131,072.
v The maximum number of include files that have executable
statements cannot exceed 1024.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Description of the TEST compiler option in z/OS XL C/C++ User's Guide
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
z/OS XL C/C++ User's Guide
How the Dynamic Debug facility can help you get maximum
performance without hooks
In the following situations, you can compile or create a program without hooks.
Then, you can use the Dynamic Debug facility to insert hooks at runtime whenever
you set a breakpoint or enter the STEP command:
v Assembler, disassembly, and LangX COBOL programs do not contain hooks.
v Enterprise COBOL for z/OS Version 5 always generates programs without
hooks.
v If you use Enterprise COBOL for z/OS, Version 4, you can compile your
programs without hooks by using the TEST(NOHOOK) compiler option.
v If you use one of the following compilers, you can compile your programs
without hooks by using the TEST(NONE) compiler option:
– Enterprise COBOL for z/OS and OS/390, Version 3
– COBOL for OS/390 & VM, Version 2 Release 2
– COBOL for OS/390 & VM, Version 2 Release 1, with APAR PQ40298
v If you use the Enterprise PL/I for z/OS, Version 3.4 or later, compiler, you can
compile your programs without hooks by using the TEST(NOHOOK) compiler
option.
The Dynamic Debug facility can also help improve the performance of Debug Tool
while debugging programs compiled with any of the following compilers:
v any COBOL compiler supported by Debug Tool
v any PL/I compiler supported by Debug Tool
When you compile with one the following compilers and have the compiler insert
hooks, you can enhance the program's performance while you debug it by using
the Dynamic Debug facility:
v any COBOL compiler supported by Debug Tool
v any PL/I compiler supported by Debug Tool
v any C/C++ compiler supported by Debug Tool
When you start Debug Tool, the Dynamic Debug facility is activated unless you
change the default by using the DYNDEBUG EQAOPTS command. If the DYNDEBUG
EQAOPTS command was used to change the default to DYNDEBUG OFF, you can
activate it by using the SET DYNDEBUG ON Debug Tool command. Note that the SET
DYNDEBUG ON Debug Tool command must be issued before you enter the STEP or GO
command. If the Dynamic Debug facility is not active, Debug Tool uses the hooks
inserted by the compiler, instead of the hooks inserted by the Dynamic Debug
facility.
Saving symbol tables in a separate debug file can reduce the size of the load
module for your program.
For C and C++ programs, debug tables can be saved in a separate debug file (.dbg
file) by specifying the FORMAT(DWARF) suboption of the DEBUG compiler option.
Debug Tool supports the DEBUG compiler option shipped with z/OS C/C++ Version
1.6 or later.
Programs compiled with the Enterprise COBOL for z/OS Version 5 compiler have
all of their debug information (including the symbol table) stored in a NOLOAD
segment of the program object. This segment is only loaded into memory when
you are debugging the program object.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
IMS/VS Batch Terminal Simulator Program Reference and Operations Manual
When you debug in browse mode, you can not do the following actions:
v Modify the contents of memory or registers
v Alter the sequence of program execution
You can use the QUERY BROWSE MODE command to determine if browse mode is
active.
For information on how to install and control browse mode, see Debug Tool
Customization Guide.
If you enter a command with an expression or condition that might alter any storage,
register, or similar data, or the command invokes any user-written function or
alters the sequence of execution, Debug Tool displays a message that the command
is not permitted in browse mode:
v do/while
v DO command (PL/I)
v EVALUATE command (COBOL)
v expression command (C and C++)
v for command (C and C++)
v %IF command
v IF command
v LIST expression command
v switch command
v while command
Also, the remote debugger does not allow you to enter the following Debug
Console commands:
v JUMPTO (and JUMPTO in the Action field of the Add a Breakpoint window)
v SET INTERCEPT
v QUIT
If an abend occurs while debugging in remote debug mode and browse mode is
active, the remote debugger does not give you any continuation options. You can
not continue program execution after the abend occurs.
The following table shows how combinations of these control methods (by RACF
access or by the EQAOPTS BROWSE command) can activate or deactivate browse
mode. For instructions using these controls see Debug Tool Customization Guide.
Table 10. How different combinations of RACF access and the EQAOPTS BROWSE
command activate or deactivate browse mode.
Setting of the EQAOPTS BROWSE command
Status of RACF Not set (use RACF
access status) ON OFF
facility (access) not normal mode browse mode is normal mode
defined (browse mode is not active
active)
ACCESS=NONE Cannot use Debug Cannot use Debug Cannot use Debug
Tool Tool Tool
ACCESS=READ browse mode is browse mode is browse mode is
active active active
ACCESS=UPDATE normal mode browse mode is normal mode
(or higher) active
After you have identified the method or methods you will use to start Debug Tool,
see Chapter 3, “Planning your debug session,” on page 23 to determine the next
task you must complete.
After you convert and debug your program, you can do one of the following
options:
v Continue to use the OS/VS COBOL compiler. Every time you want to debug
your program, you need to do the steps described in this section.
v Use the new source that was produced by the steps described in this section.
You can compile the source and debug it without repeating the steps described
in this section.
CCCA can use any level of COBOL source program as input, including VS COBOL
II, COBOL for MVS & VM, and COBOL for OS/390 & VM programs that were
previously compiled with the CMPR2 compiler option.
To create and use the deferred breakpoints, complete the following steps:
| v Create breakpoints and save the definitions in a file-based repository using the
| Create breakpoints option in the Debug Tool Deferred Breakpoints selection in
DTU. You can also use IBM Fault Analyzer to create breakpoints. See IBM Fault
Analyzer User's Guide and Reference for details.
| v View the breakpoints in the repository and save the definitions in a commands
file in the Debug Tool command format using the View breakpoints option in
the Debug Tool Deferred Breakpoints selection in DTU.
| v Set the breakpoints that are defined in the commands file during the debug
| session by using one of the methods where the commands file is accepted like a
| commands file, a preference file, or a USE command.
| The following programming languages and side file configurations are supported:
| Table 12. The supported programming languages and side file configurations
| Programming language Side file Compiled with
| Enterprise COBOL V4 or LANGX NOTEST
| earlier
| Enterprise COBOL V4 or SYSDEBUG TEST (SEPARATE)
| earlier
| Enterprise COBOL V5 Program Object TEST (SOURCE)
| Enterprise PL/I SYSDEBUG TEST (SYM,SEPARATE)
|
|
For more information about how to update these processes, see the following
topics:
v “Update your compilation, assembly, and linking process”
v “Update your library and promotion process” on page 66
v “Make the modifications necessary to implement your preferred method of
starting Debug Tool” on page 67
5. In situations where you can specify environment variables, you can set the environment variable EQA_USE_MDBG to YES or
NO, which overrides any setting (including the default setting) of the EQAOPTS MDBG command.
6. It is except for Enterprise COBOL for z/OS Version 5.
If you are using an .mdbg file that stores the source file, then
save that .mdbg file.
TEST source file that was used as input to the compiler
NOTEST listing file containing pseudo-assembler code
assembler
ADATA EQALANGX
no debug information saved listing file containing pseudo-assembler code
After you complete this task, see “Update your library and promotion process” on
page 66.
If you are using Debug Tool Utilities to prepare your program and start Debug
Tool, read Appendix C, “Examples: Preparing programs and modifying setup files
with Debug Tool Utilities,” on page 451, which describes how to prepare a sample
program and start Debug Tool by using Debug Tool Utilities. After you read the
sample and understand how to use Debug Tool Utilities, do the following steps:
1. Start Debug Tool Utilities.
2. Type in "1" to select Program Preparation, then press Enter.
3. Type in the number that corresponds to the compiler you want to use, then
press Enter.
4. Type in the information about the program you are compiling and select the
appropriate options for the CICS and DB2/SQL fields.
If the program source is a sequential data set and the DB2 precompiler is
selected, make sure the DBRMLIB data set field in panel EQAPPC1B, EQAPPC2B,
EQAPPC3B, EQAPPC4B, or EQAPPC5B is a partitioned data set with a member
name. For example, DEBUG.TEST.DBRMLIB(PROG1).
Type in the backslash character ("/") in the Enter / to edit options and data
set name patterns field, then press Enter.
5. Using the information you collected in Table 5 on page 25, fill out the fields
with the appropriate values. After you have made all the changes you want to
make, press PF3 to save this information and return to the previous panel.
Chapter 4. Updating your processes so you can debug programs with Debug Tool 63
6. Review the choices you made. Press Enter.
7. Verify your selections, then press Enter.
8. After the compilation is done, a panel is displayed. If there were errors in the
compilation, review the messages and make any changes. Return to step 1 to
repeat the compilation.
9. Press PF3 until you return to the Program Preparation panel.
10. In the Program Preparation panel, type in "L", then press Enter.
11. In the Link Edit panel, specify whether you want the link edit to run in the
foreground or background. Specify the name of other libraries you need to
link to your program. After you are done making all your changes, press
Enter.
12. Verify any selections, then press Enter.
13. After the link edit is done, if there were errors in the link edit, review the
messages and make any changes. Return to step 1 to repeat the process.
14. Press PF3 until you return to the main Debug Tool Utilities panel.
After you complete this task, see “Update your library and promotion process” on
page 66.
By default, the Enterprise PL/I compiler stores the relative path and file names in
the object file. When you start a debug session, if the source is not in the same
location as where the program is launched, Debug Tool does not locate the source.
To avoid this problem, specify the full path name for the source when you compile
the program. For example, if you execute the following series of commands, Debug
Tool does not find the source because it is located in another directory
(/u/myid/mypgm):
1. Change to the directory where your program resides and compile the program.
cd /u/myid/mypgm
pli -g "//TEST.LOAD(HELLO)" hello.pli
2. Exit UNIX System Services and return to the TSO READY prompt.
3. Launch the program with the TEST run-time option.
call TEST.LOAD(HELLO) ’test/’
Debug Tool does find the source if you change the compile command to:
pli -g "//TEST.LOAD(HELLO)" /u/myid/mypgm/hello.pli
The same restriction applies to programs that you compile to run in a CICS
environment.
Note: The quotation marks (") in the command line above are required.
2. Set up your TSO environment, as described in “Compiling your program
without using Debug Tool Utilities” on page 61 or “Compiling your program
by using Debug Tool Utilities” on page 63.
3. Debug the program under TSO by entering the following:
FRED TEST ENVAR(’PWD=/u/mike/app’) / asis
Note: The apostrophes (') in the command line above are required.
ENVAR(’PWD=/u/mike/app’) sets the environment variable PWD to the path from
where the source files were compiled. Debug Tool uses this information to
determine from where it should read the source files.
If you are creating .mdbg files, capture the source files into the .mdbg file by
specify the -c option with the dbgld command, or the CAPSRC option with the
CDADBGLD utility. To learn how to use the dbgld command and the CDADBGLD
utility, see z/OS XL C/C++ User's Guide. Debug Tool needs access to the .mdbg file
to debug your program.
By default, the C compiler stores the relative path and file names of the source files
in the object file. When you start a debug session, if the source is not in the same
location as where the program is launched, Debug Tool does not find the source.
To avoid this problem, specify the full path name of the source when you compile
the program. For example, if you execute the following series of commands, Debug
Tool does not find the source because it is located in another directory
(/u/myid/mypgm):
1. Change to the directory where your program resides and compile the program.
cd /u/myid/mypgm
c89 -g -o "//TEST.LOAD(HELLO)" hello.c
2. Exit UNIX System Services and return to the TSO READY prompt.
3. Launch the program with the TEST run-time option.
call TEST.LOAD(HELLO) ’test/’
Debug Tool finds the source if you change the compile command to:
c89 -g -o "//TEST.LOAD(HELLO)" /u/myid/mypgm/hello.c
The same restriction applies to programs that you compile to run in a CICS
environment.
If you are creating .mdbg files, capture the source files into the .mdbg file by
specify the -c option with the dbgld command, or the CAPSRC option with the
CDADBGLD utility. To learn how to use the dbgld command and the CDADBGLD
utility, see z/OS XL C/C++ User's Guide. Debug Tool needs access to the .mdbg file
to debug your program.
Chapter 4. Updating your processes so you can debug programs with Debug Tool 65
Compiling a C++ program on an HFS file system
If you are compiling and launching programs on an HFS file system, you must do
one of the following:
v Compile and launch the programs from the same location, or
v specify the full path name when you compile the programs.
By default, the C++ compiler stores the relative path and file names of the source
files in the object file. When you start a debug session, if the source is not in the
same location as where the program is launched, Debug Tool does not locate the
source. To avoid this problem, specify the full path name of the source when you
compile the program. For example, if you execute the following series of
commands, Debug Tool does not find the source because it is located in another
directory (/u/myid/mypgm):
1. Change to the directory where your program resides and compile the program.
cd /u/myid/mypgm
c++ -g -o "//TEST.LOAD(HELLO)" hello.cpp
2. Exit UNIX System Services and return to the TSO READY prompt.
3. Launch the program with the TEST run-time option.
call TEST.LOAD(HELLO) ’test/’
Debug Tool finds the source if you change the compile command to:
c++ -g -o "//TEST.LOAD(HELLO)" /u/myid/mypgm/hello.cpp
The same restriction applies to programs that you compile to run in a CICS
environment.
If you are creating .mdbg files, capture the source files into the .mdbg file by
specify the -c option with the dbgld command, or the CAPSRC option with the
CDADBGLD utility. To learn how to use the dbgld command and the CDADBGLD
utility, see z/OS XL C/C++ User's Guide. Debug Tool needs access to the .mdbg file
to debug your program.
If you are using other Problem Determination Tools, review the topics in the
chapter Quick start guide for compiling and assembling programs for use with IBM
Problem Determination Tools products of IBM Problem Determination Tools for z/OS
Common Component: Customization Guide and User Guide that correspond to the
compilers or assembler that you are using. Those topics give instructions on which
files to move through your levels so that the Problem Determination Tools can find
the files they need.
This support is not available for CICS programs. To learn how to specify
EQAOPTS commands, see the Debug Tool Reference and Messages or the Debug Tool
Customization Guide.
You might have to write several different TEST runtime options strings. For
example, the TEST runtime options string that you write for your CICS programs
might not be the same TEST runtime options string you can use for your IMS
programs. For this situation, you might want to use Table 14 to record the string
you want to use for each type of program you are debugging.
Table 14. Record the TEST runtime options strings you need for your site
Test runtime options string (for example, TEST(ALL,,,MFI
%SYSTEM01.TRMLU001:))
TSO
JES batch
UNIX System
Services
CICS
DB2
DB2 stored
procedures
(PROGRAM
TYPE=MAIN)
DB2 stored
procedures
(PROGRAM
TYPE=SUB)
IMS TM
IMS batch
Chapter 4. Updating your processes so you can debug programs with Debug Tool 67
Table 14. Record the TEST runtime options strings you need for your site (continued)
Test runtime options string (for example, TEST(ALL,,,MFI
%SYSTEM01.TRMLU001:))
IMS BTS
If you are not familiar with the format of the TEST runtime option string, see the
following topics:
v Description of the TEST runtime option in Debug Tool Reference and Messages
v Chapter 12, “Writing the TEST run-time option string,” on page 117
After you have written the TEST runtime option strings, you need to save them in
the appropriate location. Using the information you recorded in Table 11 on page
55, review the following list, which directs you to the instructions on where and
how to save the TEST runtime options strings:
Through the EQADBCXT, EQADICXT, EQADDCXT, or EQAD3CXT user exit routines
See Chapter 11, “Specifying the TEST runtime options through the Language
Environment user exit,” on page 105.
Through the DFSBXITA user exit routine
See “Setting up the DFSBXITA user exit routine” on page 102.
Using the CADP transaction
See “Creating and storing debugging profiles with CADP” on page 99.
Using the DTCN transaction
See “Creating and storing a DTCN profile” on page 88.
Using the DB2 catalog
See Chapter 8, “Preparing a DB2 stored procedures program,” on page 83.
By coding a call to CEETEST, __ctest(), or PLITEST
See one of the following topics:
v “Starting Debug Tool with CEETEST” on page 127
v “Starting Debug Tool with the __ctest() function” on page 135
v “Starting Debug Tool with PLITEST” on page 134
Through CEEUOPT or CEEROPT
See one of the following topics:
v “Starting Debug Tool under CICS by using CEEUOPT” on page 150
v “Linking DB2 programs for debugging” on page 81
v “Starting Debug Tool under IMS by using CEEUOPT or CEEROPT” on page
101
Using the CEEOPTS DD statement in JCL or CEEOPTS allocation in TSO
Use the JCL for Batch Debugging option in Debug Tool Utilities.
Using the parms on the EXEC statement when you start your program
When you specify the EXEC statement, include the TEST runtime option as a
parameter.
Use the parms on the RUN statement when you start your program
When you specify the RUN statement, include the TEST runtime option as a
parameter.
Using the parms on the CALL statement when you start your program
See the example in “Starting Debug Tool” on page 12.
Chapter 4. Updating your processes so you can debug programs with Debug Tool 69
70 Debug Tool V13.1 User's Guide
Chapter 5. Preparing a LangX COBOL program
This chapter describes how to prepare a LangX COBOL program that you can
debug with Debug Tool.
As you read through the information in this document, remember that OS/VS
COBOL programs are non-Language Environment programs, even though you
might have used Language Environment libraries to link and run your program.
If you are using other Problem Determination Tools (for example, Application
Performance Analyzer), you might need to specify additional compiler options. To
understand how the Problem Determination Tools work together, see chapter Quick
start guide for compiling and assembling programs for use with IBM Problem
Determination Tools products of IBM Problem Determination Tools for z/OS Common
Component: Customization Guide and User Guide. To learn which additional compiler
options you might need to specify, see IBM Problem Determination Tools for z/OS
Common Component: Customization Guide and User Guide.
For further information about the xxxLANGX program, look for IDILANGX in the
Fault Analyzer User's Guide and Reference. For return codes and messages, look for
IPVLANGX in the Problem Determination Tools Common Component Customization
Guide and User's Guide.
After you link-edit your program, you can run your program and start Debug
Tool.
If you use Debug Tool Utilities to prepare your assembler program, you can do
steps 1 and 2 in one step.
After you verify that your assembler program meets these requirements, prepare
your assembler program by doing the following tasks:
1. “Assembling your program.”
2. “Creating the EQALANGX file for an assembler program” on page 76.
If you are using other Problem Determination Tools, see IBM Problem Determination
Tools for z/OS Common Component: Customization Guide and User Guide to make sure
you specify all the assembler options you need to create the files needed by all the
Problem Determination Tools.
For further information about the xxxLANGX program, look for IDILANGX in the
Fault Analyzer User's Guide and Reference. For return codes and messages, look for
IPVLANGX in the Problem Determination Tools Common Component Customization
Guide and User's Guide.
To create the EQALANGX files without using Debug Tool Utilities, use JCL similar
to the following:
//XTRACT EXEC PGM=EQALANGX,REGION=32M,
// PARM=’(ASM ERROR LOUD’
//STEPLIB DD DISP=SHR,DSN=IPV.SIPVMODA
//SYSADATA DD DISP=SHR,DSN=yourid.sysadata
//IDILANGX DD DISP=OLD,DSN=yourid.EQALANGX
The following list describes the variables used in this example the parameters you
can use with the EQALANGX program:
PARM=
(ASM
Indicates that an assembler module is being processed.
ERROR
This parameter is suggested but optional. If you specify it, additional
information is displayed when an error is detected.
LOUD
The LOUD parameter is suggested, but optional. If you specify it,
additional informational and statistical messages are displayed.
The messages displayed by specifying the ERROR and LOUD parameters are
Write To Operator or Write To Programmer (WTO or WTP) messages. See the
Problem Determination Tools Common Component Customization Guide and User's
Guide for detailed information about the messages and return codes displayed
by the IPVLANGX program.
IPV.SIPVMODA
The name of the data set that contains the Common Component load modules.
If the Common Component load modules are in a system linklib data set, you
can omit the following line:
//STEPLIB DD DISP=SHR,DSN=IPV.SIPVMODA
yourid.sysadata
The name of the data set containing the SYSADATA output from the assembler.
If this is a partitioned data set, the member name must be specified. For
information about the characteristics of this data set, see HLASM Programmer's
Guide.
yourid.EQALANGX
The name of the data set where the EQALANGX debug file is to be placed.
This data set must have variable block record format (RECFM=VB) and a logical
record length of 1562 (LRECL=1562).
To read more information about a field in any panel, place the cursor in the input
field and press PF1. To read more information about a panel, place the cursor
anywhere on the panel that is not an input field and press PF1.
After you assemble your program and create the EQALANGX file, you can link-edit
your program.
To read more information about a field in any panel, place the cursor in the input
field and press PF1. To read more information about a panel, place the cursor
anywhere on the panel that is not an input field and press PF1.
After you link-edit your program, you can run your program and start Debug
Tool.
The following sections describe the tasks you need to do to prepare a DB2
program for debugging:
1. “Processing SQL statements.”
2. “Linking DB2 programs for debugging” on page 81.
3. “Binding DB2 programs for debugging” on page 82.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
DB2 UDB for z/OS Application Programming and SQL Guide
v Enterprise PL/I for z/OS and OS/390 v Use the DB2 precompiler. Save the
Version 3 Release 1 through Version 3 program source files generated by the
Release 4 DB2 precompiler, which Debug Tool uses
v Enterprise PL/I for z/OS, Version 3.5 or to debug your program. Then compile
later, and you do not specify the SEPARATE your program as described in the
suboption of the TEST compiler option appropriate section for your programming
language.
v Use the PP(SQL:('option,...')) compiler
option so that the SQL statements are
processed by the DB2 coprocessor during
compilation. Save the program source file
that you used as input to the compiler.
v If you are preparing a program using Enterprise PL/I for z/OS, Version 3.5 or
later, and you specify the SEPARATE suboption of the TEST compiler option, do
one of the following tasks:
– Use the DB2 precompiler. Compile the program source files generated by the
DB2 precompiler with the appropriate compiler options, as described in
“Choosing TEST or NOTEST compiler suboptions for PL/I programs” on
page 33, select scenario B. Save the separate debug file created by the
compiler.
– Use the PP(SQL:('option,...')) compiler option so that the SQL statements are
processed by the DB2 coprocessor during compilation. Save the separate
debug file created by the compiler.
v If you are preparing a C or C++ program using a compiler earlier than C/C++
for z/OS Version 1 Release 5, use the DB2 precompiler. Save the program source
files generated by the DB2 precompiler, which Debug Tool uses to debug your
program. Then compile your program as described in the appropriate section for
your programming language.
v If you are preparing a C or C++ program using C/C++ for z/OS Version 1
Release 5 or later, do one of the following tasks:
– Use the DB2 precompiler. Save the program source files generated by the DB2
precompiler, which Debug Tool uses to debug your program. Then compile
your program as described in the appropriate section for your programming
language.
– Specify the SQL compiler option so that the SQL statements are processed by
the DB2 coprocessor during compilation. Save the program source file that
you used as input to the compiler.
v If you are using an assembler program, first run your program through the DB2
precompiler, then assemble your program using the output of the DB2
precompiler. Generate a EQALANGX file from the assembler output and save
the EQALANGX file.
Important: Ensure that your program source, separate debug file, or program
listing is stored in a permanent data set that is available to Debug Tool.
To enhance the performance of Debug Tool, use a large block size when you save
these files. If you are using COBOL or Enterprise PL/I separate debug files, it is
important that you allocate these files with the correct attributes to optimize the
performance of Debug Tool. Use the following attributes for the PDS that contains
the COBOL or PL/I separate debug file:
v RECFM=FB
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
DB2 UDB for OS/390 Application Programming and SQL Guide
If your system programmer has not already done so, include all the proper
libraries in the SYSLIB concatenation. For example, the ISPLOAD library for
ISPLINK calls, and the DB2 DSNLOAD library for the DB2 interface modules
(DSNxxxx).
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 14, “Starting Debug Tool from a program,” on page 127
Before you begin, verify that you can use the supported debugging modes. Debug
Tool can debug stored procedures written in assembler, C, C++, COBOL and
Enterprise PL/I in any of the following debugging modes:
v remote debug
v full-screen mode using the Terminal Interface Manager
v batch
Review the topic “Creating a stored procedure” in the DB2 Application Programming
and SQL Guide to verify that your stored procedure complies with the format and
restrictions for external stored procedures. Debug Tool supports debugging only
external stored procedures.
After you link-edit your program, use the DTCN transaction to create a profile that
specifies the combination of resources that you want to debug. See “Creating and
storing a DTCN profile.”
The DTCN transaction stores debugging profiles in a repository. The repository can
be either a CICS temporary storage queue or a VSAM file. The following list
describes the differences between using a CICS temporary storage queue or a
VSAM file:
v If you don't log on to CICS or you log on as the default user, you cannot use a
VSAM file. You must use a CICS temporary storage queue.
v If you use a CICS temporary storage queue, the profile will be deleted if the
terminal that created the profile has been disconnected or the CICS region is
terminated. If you use a VSAM file, the profile will persist through
disconnections or CICS region restarts.
v If you use a CICS temporary storage queue, there can be only one profile on a
single terminal. If you use a VSAM file, there can be multiple profiles, each
created by a different user, on a single terminal.
Debug Tool determines which storage method is used based on the presence of a
debugging profile VSAM file. If Debug Tool finds a debugging profile VSAM file
allocated to the CICS region, it assumes you are using a VSAM file as the
repository. If it doesn't find a debugging profile VSAM file, it assumes you are
using a CICS temporary storage queue as the repository. See the Debug Tool
Customization Guide or contact your system programmer for more information
about how the VSAM files are created and managed.
If the repository is a VSAM file, each profile is retained until it is explicitly deleted.
The DTCN transaction uses the user ID to identify a profile. Therefore, each user
ID can have only one profile stored in the VSAM file.
Profiles are either active or inactive. If a profile is active, DTCN tries to match it
with a transaction that uses the resources specified in the profile. DTCN does not
try to match a transaction with an inactive profile. To make a profile active or
inactive, use the Debug Tool CICS Control - Primary Menu panel (the main
PF1=HELP 2=GHELP 3=EXIT 4=SAVE 5=ACT/INACT 6=DEL 7=SHOW 8=ADV 9=OPT 10=CUR TRM
Line ▌1▐ displays a message to indicate that DTCN will store the profile in a
temporary storage queue or in a VSAM file. Some of the entry fields are filled
in with values from one of the following sources:
v If the temporary storage queue is the type of repository, the fields are filled
in with default values that start Debug Tool, in full-screen mode, for tasks
running on this terminal.
v If a VSAM file is the type of repository and a profile exists for the current
user, the fields are filled in with data found in that profile. If a VSAM file is
the type of repository and a profile does not exist for the current user, the
fields are filled in with default values that start Debug Tool, in full-screen
mode, for tasks running on this terminal.
If you do not want to change these fields, you can skip the next two steps and
proceed to step 4 on page 90. If you want to change the settings on this panel,
continue to the next step.
2. Specify the combination of resources that identify the transaction or program
that you want to debug. For more information about these fields, do one of
the following tasks:
v Read “Description of fields on the DTCN Primary Menu screen” on page
92.
v Place the cursor next to the field and press PF1 to display the online help.
3. Specify the type of debugging session you want to run and the ID of the
device that displays the debugging session. For more information about these
fields, do one of the following tasks:
v Read “Description of fields on the DTCN Primary Menu screen” on page
92.
Some of the entry fields are filled in with default values that start Debug Tool,
in full-screen mode, for tasks running on this terminal. If you do not want to
change the defaults, you can skip the rest of this step and proceed to step 5. If
you want to change the settings on this panel, continue with this step.
5. Press PF3 to return to the main DTCN panel.
6. If you want to use data passed through COMMAREA or containers to help
identify transactions and programs that you want to debug, press PF8. The
Advanced Options panel is displayed, which looks like the following
example:
DTCN Debug Tool CICS Control - Advanced Options S07CICPD
You can specify data in the COMMAREA or containers, but not both. You can
also use this panel to indicate whether you want to debug user replaceable
modules (URMs). For more information about these fields, do one of the
following tasks:
Now, any tasks that run in the CICS system and match the resources that you
specified in the previous steps will start Debug Tool.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Displaying a list of active DTCN profiles and managing DTCN profiles”
Related references
“Description of fields on the DTCN Primary Menu screen” on page 92
Description of the DTCD transaction in Debug Tool Customization Guide
Overtype "_" with "D" to delete, "A" to activate, "I" to inactivate a profile.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Creating and storing a DTCN profile” on page 88
The following list describes the fields that you can use to indicate which type of
debugging session you want to run.
Session Type
Select one of the following options:
MFI Indicates that Debug Tool initializes on a 3270 type of terminal.
TCP Indicates that you want to interact with Debug Tool from your
workstation using TCP/IP and a remote debugger.
Port Number
Specifies the TCP/IP port number that is listening for debug sessions on
your workstation. By default, the following products use port 8001:
v IBM Problem Determination Tools Studio
v IBM Problem Determination Tools Plug-ins V13 Combined Packages
v Compiled Language Debugger component of Rational Developer for
System z
Display Id
Identifies the target destination for Debug Tool.
If you entered TCP in the Session Type field, determine the IP address or
host name of the workstation that is running the remote debugger. Change
the value in the Display Id field by doing the following steps:
1. Place your cursor on the Display Id field
2. Type in the IP address or host name of the workstation that is running
the remote debugger
3. To save the profile with this new value, press PF4.
If you entered MFI in the Session Type field, DTCN fills in the Display Id
field according to the following rules:
v If the type of repository is a VSAM file and the current user ID has a
saved profile, DTCN fills in the field with the display ID that is in the
repository.
v If the type of repository is a VSAM file and the current user ID does not
have a saved profile, DTCN fills in the field with the ID of the terminal
you are currently running on.
v If the type of repository is a temporary storage queue, DTCN fills in the
field with the ID of the terminal you are currently running on.
Before using CADP, verify that you have done the following tasks:
v Compiled and linked your program as described in Chapter 9, “Preparing a
CICS program,” on page 87.
v Verified that your site uses CADP and that all the tasks required to customize
Debug Tool so that it can debug CICS programs described in Debug Tool
Customization Guide are completed. In particular, verify that the DEBUGTOOL
system initialization parameter is set to YES so that Debug Tool uses the CADP
profile repository instead of the DTCN profile repository to find a matching
debugging profile.
See CICS Supplied Transactions for instructions on how to use the CADP utility
transaction. If you are going to debug user-replaceable modules (URMs), specify
ENVAR("INCLUDEURM=YES") in the Other Language Environment Options field.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
CICS Application Programming Guide for a description of debugging profiles.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Debug Tool Customization Guide
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Debug Tool Reference and Messages
To use CEEUOPT to specify your TEST runtime options, do the following steps:
1. Code an assembler program that includes a CEEXOPT macro invocation that
specifies your application program's runtime options.
2. Assemble the program.
3. Link-edit the program into your application program by specifying an
INCLUDE LibraryDDname(CEEUOPT-member name)
4. Place your application program in the load library used by IMS.
To use CEEROPT to specify your TEST runtime options, do the following steps:
1. Code an assembler program that includes a CEEXOPT macro invocation that
specifies your region's runtime options.
2. Assemble the program.
3. Link-edit the program into a load module named CEEROPT by specifying an
INCLUDE LibraryDDname(CEEROPT-member name)
4. Place the CEEROPT load module into the load library used by IMS.
The following sample JCL describes how to do a replace link edit of the IMS
CEEBXITA into a CEEBINIT load module:
When you assembled the IMS user exit DFSBXITA, if you named the resulting
object member DFSBXITA, replace CEEBXITA on line ▌1▐ with DFSBXITA.
The user exit extracts the TEST runtime option from a user controlled data set with
a name that is constructed from a naming pattern. The naming pattern can include
the following tokens:
&USERID
Debug Tool replaces the &USERID token with the user ID of the current user.
Each user can specify an individual TEST runtime option when debugging an
application. This token is optional.
&PGMNAME
Debug Tool replaces the &PGMNAME token with the name of the main program
(load module). Each program can have its own TEST runtime options. This
token is optional.
| Debug Tool Utilities option 'B Delay Debug Profile' and the DTSP Profile Manager
| plug-in now create an enhanced debug profile that contains a new <NM2> tag
| (rather than the old <PGM> tag) and will only work with the consolidated user
| exit.
Note:
1. EQADDCXT or EQAD3CXT is supported for DB2 version 7 or later. If DB2
RUNOPTS is specified, EQADDCXT or EQAD3CXT takes precedence over DB2
RUNOPTS.
2. For IMS TM, if you do not sign on to the IMS terminal, you might need to run
the EQASET transaction with the TSOID option. For instructions on how to run
the EQASET transaction, see “Debugging Language Environment IMS MPPs
without issuing /SIGN ON” on page 375.
3. For BTS, you need to specify Environment command (./E) with the user ID of
the IO PCB. For example, if the user ID is ECSVT2, then the Environment
command is ./E USERID=ECSVT2.
4. Link the user exit into a private copy of the Language Environment module
CEEPIPI, not to your application program.
To learn about the advantages and disadvantages of each method, see “Comparing
the two methods of linking CEEBXITA” on page 109.
To prepare a program to use the Language Environment user exit, do the following
tasks:
1. “Editing the source code of CEEBXITA.”
2. “Linking the CEEBXITA user exit into your application program” on page 109
or “Linking the CEEBXITA user exit into a private copy of a Language
Environment runtime module” on page 110.
3. “Creating and managing the TEST runtime options data set” on page 111.
v Create a private load module for the customized exit. Copy the assembler user
exit that has the same name as the user exit from hlq.SEQASAMP to a local data
set. Edit the patterns or message display level. Customize and run the JCL to
generate a load module.
In some cases, the first character of a user ID is not valid for a name qualifier. A
character can be concatenated before the &USERID token to serve as the prefix
character for the user ID. For example, you can prefix the token with the character
"P" to form P&USERID, which is a valid name qualifier after the current user ID is
substituted for &USERID. For IMS, &USERID token might be substituted with one of
the following values:
v IMS user ID, if users sign on to IMS.
v TSO user ID, if users do not sign on to IMS.
The following table shows examples of naming patterns and the corresponding
data set names after Debug Tool substitutes the token with a value.
Table 16. Data set naming patterns, values for tokens, and resulting data set names
Naming pattern User ID Program name Name after user ID substitution
&USERID.DBGTOOL.EQAUOPTS JOHNDOE JOHNDOE.DBGTOOL.EQAUOPTS
P&USERID.EQAUOPTS 123456 P123456.EQAUOPTS
DT.&USERID.TSTOPT TESTID DT.TESTID.TSTOPT
DT.&USERID.&PGMNAME.TSTOPT TESTID IVP1 DT.TESTID.IVP1.TSTOPT
To customize the naming pattern of the data set that has TEST runtime option,
change the value of the DSNT DC statement in the sample user exit. For example:
* Modify the value in DSNT DC field below.
*
* Note: &USERID below has one additional ’&’, which is an escape
* character.
*
DSNT_LN DC A(DSNT_SIZE) Length field of naming pattern
DSNT DC C’&&USERID.DBGTOOL.EQAUOPTS’
DSNT_SIZE EQU *-DSNT Size of data set naming pattern
*
Chapter 11. Specifying the TEST runtime options through the Language Environment user exit 107
Modifying the message display level
You can modify the message display level for CEEBXITA. The following values set
WTO message display level:
X'00'
Do not display any messages.
X'01'
Display error and warning messages.
X'02'
Display error, warning, and diagnostic messages.
To customize the message display level, change the value of the MSGS_SW DC
statement in the sample user exit. For example:
* The following switch is to control WTO message display level.
*
* x’00’ - no messages
* x’01’ - error and warning messages
* x’02’ - error, warning, and diagnostic messages
*
MSGS_SW DC X’00’ message level
*
If you link the user exit into the application program and into a private copy of a
Language Environment runtime load module, which is in the load module search
path of your application execution, the copy of the user exit in the application load
module is used.
Chapter 11. Specifying the TEST runtime options through the Language Environment user exit 109
// PARM=’CALL,XREF,LIST,LET,MAP,RENT’
//SYSLMOD DD DISP=SHR,DSN=USERID.OUTPUT.LOAD
//SYSPRINT DD DISP=OLD,DSN=USERID.OUTPUT.LINKLIST(TESTPGM)
//SYSUT1 DD UNIT=SYSDA,SPACE=(1024,(200,20))
//*
//SYSLIB DD DISP=SHR,DSN=hlq.SEQAMOD
// DD DISP=SHR,DSN=CEE.SCEELKED
//*
//OBJECT DD DISP=SHR,DSN=USERID.INPUT.OBJECT
//SYSLIN DD *
INCLUDE OBJECT(TESTPGM)
INCLUDE SYSLIB(EQADICXT)
NAME TESTPGM(R)
/*
The following table shows the Language Environment runtime load module and
the user exit needed for each environment.
Table 17. Language Environment runtime module and user exit required for various
environments
CEE load
Environment User exit name module
The following types of DB2 stored procedures that EQADDCXT or CEEPIPI
run in WLM-established address spaces: EQAD3CXT2
v type MAIN
v type SUB, invoked by the call_sub function1
IMS TM and BTS EQADICXT or CEEBINIT
EQAD3CXT
Batch EQADBCXT or CEEBINIT
EQAD3CXT
Note:
1. This requires that you install the PTF for APAR PM15192 for Language
Environment Version 1.10 to Version 1.12.
You can create this data set in one of the following ways:
v By using Terminal Interface Manager (TIM), as described in “Creating and
managing the TEST runtime options data set by using Terminal Interface
Manager (TIM).”
v By using Debug Tool Utilities option 6, "Debug Tool User Exit Data Set", as
described in “Creating and managing the TEST runtime options data set by
using Debug Tool Utilities” on page 113.
v By using the DTSP Profile view. To learn more about this view, see Appendix K,
“Installing the IBM Debug Tool plug-ins,” on page 545.
To create the TEST runtime options data set by using Terminal Interface Manager,
do the following steps:
1. Log on to Terminal Interface Manager.
2. In the DEBUG TOOL TERMINAL INTERFACE MANAGER panel, press
PF10.
3. In the * Specify TEST Run-time Option Data Set * panel, type in the name of
a data set which follows the naming pattern specified by your system
administrator, in the Data Set Name field. If the data set is not cataloged, type
in a volume serial.
4. Press Enter. If Terminal Interface Manager cannot find the data set, it displays
the * Allocate TEST Run-time Option Data Set * panel. Specify allocation
parameters for the data set, then press Enter. Terminal Interface Manager
creates the data set.
5. In the * Edit TEST Run-time Option Data Set * panel, make the following
changes:
Program name(s)
Specify the names of up to eight programs you want to debug. You can
specify specific names (for example, EMPLAPP), names appended with a
wildcard character (*), or just the wildcard character (which means you
want to debug all Language Environment programs).
Test Option
Specify whether to use TEST or NOTEST runtime option.
Test Level
Specify which TEST level to use: ALL, ERROR, or NONE.
Chapter 11. Specifying the TEST runtime options through the Language Environment user exit 111
Commands File
If you want to use a commands file, specify the name of a commands file
in the format described in the commands_file_designator section of the topic
“Syntax of the TEST run-time option” in the Debug Tool Reference and
Messages manual.
Prompt Level
Specify whether to use PROMPT or NOPROMPT.
Preferences File
If you want to use a preferences file, specify the name of a preferences file
in the format described in the preferences_file_designator section of the topic
“Syntax of the TEST run-time option” in the Debug Tool Reference and
Messages manual.
EQAOPTS File
If you want Debug Tool to run any EQAOPTS commands at run time,
specify the name of the EQAOPTS file as a fully-qualified data set name.
Other run-time options
Type in any other Language Environment runtime options.
6. Terminal Interface Manager displays the part of the TEST runtime option that
specifies which session type (debugging mode and display information) you
want to use under the Current debug display information field. To change the
session type, do the following steps:
a. Press PF9.
b. In the Change session type panel, select one of the following options:
Full-screen mode using the Debug Tool Terminal Interface Manager
Type in the user ID you will use to log on to Terminal Interface
Manager and debug your program in the User ID field.
Remote debug mode
Type in the IP address in the Address field and port number in the Port
field of the remote debugger's daemon.
c. (Optional) Press Enter. Terminal Interface Manager accepts the changes and
refreshes the panel.
d. Press PF4. Terminal Interface Manager displays the * Edit TEST Run-time
Option Data Set * panel and under the Current debug session type string:
displays one of the following strings:
v VTAM%userid, if you selected Full-screen mode using the Debug Tool
Terminal Interface Manager.
v TCPIP&IP_address%port, if you selected Remote debug mode.
7. Press PF4 to save your changes to the TEST runtime options data set and to
return to the main Terminal Interface Manager screen.
Refer to the following topics for more information related to the material discussed
in this topic.
v For more information about the values to specify for the Test Option, Test Level,
and Prompt Level fields, see the topic “Syntax of the TEST run-time option” in
the Debug Tool Reference and Messages manual.
v For instructions on creating a commands file or preferences file, see the topics
“Creating a commands file” on page 182 or “Creating a preferences file” on page
165.
Chapter 11. Specifying the TEST runtime options through the Language Environment user exit 113
114 Debug Tool V13.1 User's Guide
Part 3. Starting Debug Tool
This topic describes some of the factors you should consider when you use the
TEST runtime option, provides examples, and describes other runtime options you
might need to specify. The syntax of the TEST runtime option is described in the
topic “TEST run-time option” in Debug Tool Reference and Messages.
To specify how Debug Tool gains control of your application and begins a debug
session, you use the TEST run-time option. The simplest form of the TEST option is
TEST with no suboptions specified; however, suboptions provide you with more
flexibility. There are four types of suboptions available, summarized below.
test_level
Determines what high-level language conditions raised by your program
cause Debug Tool to gain control of your program
commands_file
Determines which primary commands file is used as the initial source of
commands
prompt_level
Determines whether an initial commands list is unconditionally run during
program initialization
preferences_file
Specifies the session parameter and a file that you can use to specify
default settings for your debugging environment, such as customizing the
settings on the Debug Tool Profile panel
You can change the TEST/NOTEST run-time options at any time with the SET TEST
command.
Implicit breakpoints
If the test level in effect causes Debug Tool to gain control at a condition or at a
particular program location, an implicit breakpoint with no associated action is
assumed. This occurs even though you have not previously defined a breakpoint
for that condition or location using an initial command string or a primary
commands file. Control is given to your terminal or to your primary commands
file.
The initial command list, whether it consists of a command string included in the
run-time options or a primary commands file, can contain a USE command to get
commands from a secondary file. If started from the primary commands file, a
USE file takes on the characteristics of the primary commands file.
If you enter the STEP command at this point, before entering any other commands,
both program and Language Environment initialization are completed and you are
given access to all variables. You can also enter all valid commands.
If Debug Tool is started while your program is running (for example, by using a
CEETEST call), it might not be able to find all compile units associated with your
application. Compile units located in load modules that are not currently active are
not known to Debug Tool, even if they were run prior to Debug Tool's
initialization.
For example, suppose load module mod1 contains compile units cu1 and cu2, both
compiled with the TEST option. The compile unit cu1 calls cux, contained in load
module mod2, which returns after it completes processing. The compile unit cu2
contains a call to the CEETEST library service. When the call to CEETEST initializes
Debug Tool, only cu1 and cu2 are known to Debug Tool. Debug Tool does not
recognize cux.
Commands in the preferences file are run only once, when Debug Tool is first
initialized in the process.
Session log
The session log stores the commands entered and the results of the execution of
those commands. The session log saves the results of the execution of the
commands as comments. This allows you to use the session log as a commands
file.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Link-editing EQADCCXT into your program” on page 87
Related references
Debug Tool Reference and Messages
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
z/OS Language Environment Programming Guide
Note: This option replaces the OS PL/I and VS COBOL II STAE/NOSTAE options.
This #pragma must appear before the first statement in your source file. For
example, if you specified the following in the source:
#pragma runopts (notest(all,*,prompt))
TEST overrides the NOTEST option specified in the #pragma and, because TEST does
not contain any suboptions of its own, the suboptions ALL, *, and PROMPT remain in
effect.
If you link together two or more compile units with differing #pragmas, the options
specified with the first compile are honored. With multiple enclaves, the options
specified with the first enclave (or compile unit) started in each new process are
honored.
If you specify options on the command line and in a #pragma, any options entered
on the command line override those specified in the #pragma unless you specify
NOEXECOPS. Specifying NOEXECOPS, either in a #pragma or with the EXECOPS compiler
option, prevents any command line options from taking effect.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
z/OS XL C/C++ User's Guide
Then you use the setup files to run your program in foreground or batch. The
Debug Tool Setup Utility (DTSU) RUN command performs the file allocations and
then starts the program with the specified options and parameters in the
foreground. The DTSU SUBMIT command submits a batch job to start the program.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Creating the setup file”
“Editing an existing setup file”
“Saving your setup file” on page 126
“Starting your program” on page 126
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Entering file allocation statements, runtime options, and program parameters”
on page 124
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Entering file allocation statements, runtime options, and program parameters”
You can use option A to select a step of a job, and convert it to the setup file
format.
To modify the name of the load module, type the new name in the Load Module
Name field.
Debug Tool Utilities does not support reordering the DD names, only the data sets
within each concatenation. The DD names are automatically sorted in alphabetical
order. To reorder statements in a concatenation, do the following steps:
1. Move your cursor to the sequence number field of a statement you want to
move and enter the new sequence number.
The Edit and Browse line commands allow you to modify or view the contents of
the data set name specified for DD and SYSIN DD types.
You can use the DDNAME STEPLIB to specify the load module search order.
For additional help, move the cursor to any field and enter the HELP command or
press PF1.
Chapter 13. Starting Debug Tool from the Debug Tool Utilities 125
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Saving your setup file”
To save your setup file and exit the Edit–Edit Setup File panel, enter the END
command or press PF3.
To exit the Edit–Edit Setup File panel without saving any changes to your setup
file, enter the CANCEL command or press PF12.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Starting your program”
To generate JCL from the information in the setup file and then submit to the batch
job, enter the SUBMIT command or press PF10.
Debug Tool can also be started directly from within your program using one of the
following methods:
v Language Environment provides the callable service CEETEST that is started from
Language Environment-enabled languages.
v For C or C++ programs, you can use a __ctest() function call or include a
#pragma runopts specification in your program.
However, you cannot use these methods in DB2 stored procedures with the
PROGRAM TYPE of SUB.
If you use these methods to start Debug Tool, you can debug non-Language
Environment programs and detect non-Language Environment events only in the
enclave in which Debug Tool first appeared and in subsequent enclaves. You
cannot debug non-Language Environment programs or detect non-Language
Environment events in higher-level enclaves.
To start Debug Tool using these alternatives, you still need to be aware of the TEST
suboptions specified using NOTEST, CEEUOPT, or other "indirect" settings.
“Example: using CEETEST to start Debug Tool from C/C++” on page 130
“Example: using CEETEST to start Debug Tool from COBOL” on page 131
“Example: using CEETEST to start Debug Tool from PL/I” on page 132
Related tasks
“Starting Debug Tool with CEETEST”
“Starting Debug Tool with PLITEST” on page 134
“Starting Debug Tool with the __ctest() function” on page 135
“Starting Debug Tool under CICS by using CEEUOPT” on page 150
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
“Special considerations while using the TEST run-time option” on page 117
Using CEETEST when Debug Tool is already initialized results in a reentry that is
similar to a breakpoint.
►► void CEETEST ( , ) ; ►◄
string_of_commands fc
For COBOL
For PL/I
►► CALL CEETEST ( * , * ) ; ►◄
string_of_commands fc
string_of_commands (input)
Halfword-length prefixed string containing a Debug Tool command list. The
command string string_of_commands is optional.
If Debug Tool is available, the commands in the list are passed to the debugger
and carried out.
If string_of_commands is omitted, Debug Tool prompts for commands in
interactive mode.
For Debug Tool, remember to use the continuation character if your command
exceeds 72 characters.
The first command in the command string can indicate that you want to start
Debug Tool in one of the following debug modes:
v full-screen mode using the Terminal Interface Manager
v remote debug mode
To indicate that you want to start Debug Tool in full-screen mode using a
dedicated terminal without Terminal Interface Manager, specify the MFI
suboption of the TEST runtime option with the LU name of the dedicated
terminal. For example, you can code the following call in your PL/I program:
Call CEETEST(’MFI%TRMLU001:*;Query Location;Describe CUS;’,*);
Severity = 0
Msg_No = Not Applicable
Message = Service completed successfully
CEE2F2
Severity = 3
Msg_No = 2530
Message = A debugger was not available
Note: The CEE2F2 feedback code can also be obtained by MVS/JES batch
applications. For example, either the Debug Tool environment was corrupted
or the debug event handler could not be loaded.
For C and C++ and COBOL, if Debug Tool was started through CALL CEETEST, the
GOTO command is only allowed after Debug Tool has returned control to your
program via STEP or GO.
int main(void) {
_VSTRING commands;
_FEEDBACK fc;
strcpy(commands.string, "");
commands.length = strlen(commands.string);
CEETEST(&commands, &fc);
}
Example 2
In this example, a string of valid Debug Tool commands is passed to
Debug Tool and a pointer to Language Environment feedback code is
returned. The call to CEETEST starts Debug Tool and the command string is
processed. At statement 23, the values of x and y are displayed in the Log,
and execution of the program resumes. Barring further interrupts, the
behavior at program termination depends on whether you have set AT
TERMINATION:
v If you have set AT TERMINATION, Debug Tool regains control and prompts
you for commands.
v If you have not set AT TERMINATION, the program terminates.
The command LIST(z) is discarded when the command GO is executed.
int main(void) {
_VSTRING commands;
_FEEDBACK fc;
int x,y,z;
_VSTRING commands;
_FEEDBACK fc;
01 Parms.
05 AA PIC S9(4) BINARY Value 14.
05 BB PIC x(14) Value ’SET SCREEN ON;’.
The result of the call is returned in the feedback code, using a variable
defined as:
01 FC.
02 CONDITION-TOKEN-VALUE.
COPY CEEIGZCT.
03 CASE-1-CONDITION-ID.
04 SEVERITY PIC S9(4) BINARY.
04 MSG-NO PIC S9(4) BINARY.
03 CASE-2-CONDITION-ID
REDEFINES CASE-1-CONDITION-ID.
04 CLASS-CODE PIC S9(4) BINARY.
04 CAUSE-CODE PIC S9(4) BINARY.
03 CASE-SEV-CTL PIC X.
03 FACILITY-ID PIC XXX.
02 I-S-INFO PIC S9(9) BINARY.
in the DATA DIVISION of your program. You are not prompted for
commands.
CALL "CEETEST" USING COMMAND-STRING FC.
DCL 1 fb,
5 Severity Fixed bin(15),
5 MsgNo Fixed bin(15),
5 flags,
8 Case bit(2),
8 Sev bit(3),
8 Ctrl bit(3),
5 FacID Char(3),
5 I_S_info Fixed bin(31);
If ¬FBCHECK(FC, CEE000)
Then Put Skip List(’––––> ERROR! in CEETEST call’, FC.MsgNo);
►► CALL PLITEST ; ►◄
( character_string_expression )
character_string_expression
Specifies a list of Debug Tool commands. If necessary, this is converted to a
fixed-length string.
Note:
1. If Debug Tool executes a command in a CALL PLITEST command string that
causes control to return to the program (GO for example), any commands
remaining to be executed in the command string are discarded.
2. If you don't want to compile your program with hooks, you can use CALL
PLITEST statements as hooks and insert them at strategic points in your
program. If you decide to use this method, you still need to compile your
application so that symbolic information is created.
The following examples show how to use PLITEST to start Debug Tool for PL/I.
Example 1
No argument is passed to Debug Tool when it is started. After gaining
control, Debug Tool prompts you for commands.
CALL PLITEST;
Example 2
A string of commands is passed to Debug Tool when it is started. After
gaining control, Debug Tool sets a breakpoint at statement 23, and returns
control to the program. You are not prompted for commands. In addition,
the List Y; command is discarded because of the execution of the GO
command.
CALL PLITEST(’At statement 23 Do; List X; End; Go; List Y;’);
Example 3
Variable ch is declared as a character string and initialized as a string of
commands. The string of commands is passed to Debug Tool when it is
started. After it runs the commands, Debug Tool prompts you for more
commands.
DCL ch Char(45) Init(’At Statement 23 Do; List x; End;’);
CALL PLITEST(ch);
Note: If you do not include ctest.h in your source or if you compile using the
option LANGLVL(ANSI), you must use __ctest() function. The __ctest() function is
not supported in CICS.
When a list of commands is specified with __ctest(), Debug Tool runs the
commands in that list. If you specify a null argument, Debug Tool gets commands
by reading from the supplied commands file or by prompting you. If control
returns to your application before all commands in the command list are run, the
remainder of the command list is ignored. Debug Tool will continue reading from
the specified commands file or prompt for more input.
If you do not want to compile your program with hooks, you can use __ctest()
function calls to start Debug Tool at strategic points in your program. If you decide
to use this method, you still need to compile your application so that symbolic
information is created.
Using __ctest() when Debug Tool is already initialized results in a reentry that is
similar to a breakpoint.
(1)
►► int __ctest ( char *char_str_exp ) ; ►◄
Notes:
1 The syntax for ctest() and __ctest() is the same.
char_str_exp
Specifies a list of Debug Tool commands.
The following examples show how to use the __ctest() function for C and C++.
Example 1
A null argument is passed to Debug Tool when it is started. After it gains
control, Debug Tool prompts you for commands (or reads commands from
the primary commands file, if specified).
__ctest(NULL);
Example 2
A string of commands is passed to Debug Tool when it is started. At
statement 23, Debug Tool lists x and y, then returns control to the program.
You are not prompted for commands. In this case, the command list z; is
never executed because of the execution of the command GO.
__ctest("at line 23 {"
" list x;"
" list y;"
"}"
"go;"
"list z;");
__ctest(strcat(buffer, ch));
To start Debug Tool in batch mode without using DTSU, do the following steps:
1. Ensure that you have compiled your program with the TEST compiler option.
2. Modify the JCL that runs your batch program to include the appropriate Debug
Tool data sets and to specify the TEST run-time option.
3. Run the modified JCL.
You can interactively debug an MVS batch job by choosing one of the following
options:
v In full-screen mode using the Terminal Interface Manager. Follow the
instructions in “Starting a debugging session in full-screen mode using the
Terminal Interface Manager or a dedicated terminal” on page 139.
v In remote debug mode. Follow the instructions in the topic “Preparing to
debug” of the online help for the Compiled Language Debugger component of
Rational Developer for System z or the IBM Problem Determination Tools
Studio.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Appendix F, “Notes on debugging in batch mode,” on page 523
Chapter 28, “Entering Debug Tool commands,” on page 283
You need to decide whether you will use the Debug Tool Terminal Interface
Manager. The Debug Tool Terminal Interface Manager enables you to associate a
user ID with a specific dedicated terminal, which removes the need to update your
runtime parameter string whenever the dedicated terminal LU name changes. This
is the recommended method for most users.
Note: When you provide your user ID and password to the Terminal Interface
Manager, you are not logging on TSO. You are only indicating that your user
ID is to be associated with this terminal LU.
A panel similar to the following panel is then displayed on the second terminal
emulator session:
The terminal is now ready to receive a Debug Tool full-screen mode using the
Terminal Interface Manager session.
4. Edit the PARM string of your batch job so that you specify the TEST runtime
parameter as follows:
TEST(,,,VTAM%userid:*)
Place a slash (/) before or after the parameter, depending on our programming
language. userid is the TSO user ID that you provided to the Terminal Interface
Manager.
5. Submit the batch job.
6. On the second terminal emulator session, a full-screen mode debugging session
is displayed. Interact with it the same way you would with any other
full-screen mode debugging session.
7. After you exit Debug Tool, the second terminal emulator session displays the
panel and messages you saw in step 3. This indicates that Debug Tool can use
this session again. (this will happen each time you exit from Debug Tool).
8. If you want to start another debugging session, return to step 5. If you are
finished debugging, you can do one of the following tasks:
v Close the second terminal emulator session.
v Exit the Terminal Interface Manager by choosing one of the following
options:
– Press PF12 to display the Terminal Interface Manager logon panel. You
can log in with the same ID or a different user ID.
– Press PF3 to exit the Terminal Interface Manager.
To start a debugging session using a dedicated terminal without the Debug Tool
Terminal Interface Manager, do the following steps:
1. Ask your system programmer if you need to specify a VTAM network
identifier to communicate with the terminal LU you will use for display. If so,
make a note of the network identifier.
2. Start two terminal emulator sessions. Connect the second emulator session to a
terminal that can handle a full-screen mode debugging session through a
dedicated terminal.
To start Debug Tool under MVS in TSO without using DTSU, do the following
steps:
1. Ensure your program has been compiled with the TEST compiler option.
2. Ensure that the Debug Tool SEQAMOD library is in the load module search
path.
Note: High-level qualifiers and load library names are specific to your
installation. Ask the person who installed Debug Tool the name of the data set.
By default, the name of the data set ends in SEQAMOD. This data set might
already be in the linklist or included in your TSO logon procedure, in which
case you don't need to do anything to access it.
3. Allocate all other data sets containing files your program needs.
4. Allocate any Debug Tool files that you want to use. For example, if you want a
session log file, allocate a data set for the session log file. Do not allocate the
session log file to a terminal. For example, do not use ALLOC FI(INSPLOG)
DA(*).
5. Start your program with the TEST run-time option, specifying the appropriate
suboptions, or include a call to CEETEST, PLITEST, or __ctest() in the program's
source.
Chapter 16. Starting Debug Tool for batch or TSO programs 141
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 12, “Writing the TEST run-time option string,” on page 117
“Starting a debugging session in full-screen mode using the Terminal Interface
Manager or a dedicated terminal” on page 139
“Recording your debug session in a log file” on page 183
Chapter 14, “Starting Debug Tool from a program,” on page 127
Related references
Debug Tool Reference and Messages
z/OS Language Environment Programming Guide
Example 1:
PROC 0 TEST
TSOLIB ACTIVATE DA(’hlq.SEQAMOD’)
END
Example 2:
PROC 0 TEST
TSOLIB DEACTIVATE
FREE FILE(SEQAMOD)
ALLOCATE DA(’hlq.SEQAMOD’) FILE(SEQAMOD) SHR REUSE
TSOLIB ACTIVATE FILE(SEQAMOD)
END
If you store either example CLIST in MYID.CLIST(DTSETUP), you can run the CLIST
by entering the following command at the TSO READY prompt:
EXEC ’MYID.CLIST(DTSETUP)’
The CLIST runs and the appropriate Debug Tool data set is allocated.
The example illustrates that the default Debug Tool run-time suboptions and the
default Language Environment run-time options were assumed.
The following example illustrates how you can use a CLIST to define the
preferences file (debug.preferen) and the log file (debug.log), then start the C
program prog1 with the TEST run-time option:
ALLOC FI(insplog) DA(debug.log) REUSE
ALLOC FI(insppref) DA(debug.preferen) REUSE
CALL ’MYID.MYQUAL.LOAD(PROG1)’ +
’ TRAP(ON) TEST(,*,;,insppref)/’
If the initial program does run under the control of Language Environment and
subsequent programs run outside the control of Language Environment, you can
use the methods described in “Starting Debug Tool for programs that start in
Language Environment” on page 141 to debug all the programs.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 13, “Starting Debug Tool from the Debug Tool Utilities,” on page 123
Chapter 16. Starting Debug Tool for batch or TSO programs 143
v The name of the user program to be debugged (required)
v Any of the following run-time options (optional):
– COUNTRY to specify a country code for Debug Tool
– NATLANG to specify the national language used to communicate with Debug
Tool
– NQNLESP to specify the SUBPOOL for Debug Tool to use for its storage
– TEST to specify Debug Tool options. For example, you can use suboptions of
the TEST run-time option to specify the data sets that contain Debug Tool
commands and preferences. You can use suboptions to specify whether to use
a remote debug mode session or a full-screen mode using the Terminal
Interface Manager session.
– TRAP to specify whether Debug Tool is to intercept abends.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Debug Tool run-time options (Debug Tool Reference and Messages)
►► user_program_name ►◄
, / user_parms
, ▼ run-time_parm
The following table compares how a sample JCL statement might look like after
you modify the PARM string:
This can be desirable if you need to pass the same run-time parameters to several
programs, you have room in the PARM string to add the name of the program to
be debugged, but you do not have room to add all of the run-time parameters to
the PARM string.
Chapter 16. Starting Debug Tool for batch or TSO programs 145
Example: Modifying JCL that invokes an assembler DB2
program running in a batch TSO environment
The following example shows a portion of JCL that invokes an assembler DB2
program and the modifications you make to this portion of the JCL to start Debug
Tool.
To start Debug Tool under CICS by using DTCN, do the following steps:
1. If you chose screen control mode, start the DTSC transaction on the terminal
you specified in the Display Id field.
2. Run your CICS programs. If Debug Tool identifies a task that matches a DTCN
profile, Debug Tool starts. If you chose screen control mode, press Enter on the
terminal running the DTSC transaction to connect to Debug Tool.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Choosing TEST or NOTEST compiler suboptions for COBOL programs” on
page 27
To start Debug Tool under CICS by using CADP, do the following steps:
1. If you chose screen control mode, start the DTSC transaction on the terminal
you specified in the Display Id field.
2. Run your CICS programs. If Debug Tool identifies a task that matches a CADP
profile, Debug Tool starts. If you chose screen control mode, press Enter on the
terminal running the DTSC transaction to connect to Debug Tool.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Creating and storing debugging profiles with CADP” on page 99
Related references
CICS Supplied Transactions
Debug Tool runs in the mode defined in the TEST run-time option you supplied,
normally Single Terminal mode, although you could provide a primary commands
file and a log file and not use a terminal at all.
To start Debug Tool, simply run the application. Don't forget to remove the
CEEUOPT containing your TEST run-time option when you have finished
debugging your program.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 12, “Writing the TEST run-time option string,” on page 117
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Starting Debug Tool with CEETEST” on page 127
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 13, “Starting Debug Tool from the Debug Tool Utilities,” on page 123
“Choosing TEST or DEBUG compiler suboptions for C programs” on page 39
“Choosing TEST or DEBUG compiler suboptions for C++ programs” on page 44
“Choosing TEST or NOTEST compiler suboptions for COBOL programs” on
page 27
“Choosing TEST or NOTEST compiler suboptions for PL/I programs” on page
33
“Ending a full-screen debug session” on page 210
“Entering commands on the session panel” on page 167
“Passing parameters to EQANMDBG” on page 143
To verify that the stored procedure has started, enter the following DB2 Display
command, where xxxx is the name of the stored procedure:
Display Procedure(xxxx)
If the stored procedure is not started, enter the following DB2 command:
Start procedure(xxxx)
If Debug Tool or the remote debugger do not start when the stored procedure calls
them, verify that you have correctly specified connection information (for example,
the TCP/IP address and port number) in the Language Environment EQADDCXT
or EQAD3CXT exit routine or the DB2 catalog.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 3, “Planning your debug session,” on page 23
Debugging your programs in full-screen mode is the easiest way to learn how to
use Debug Tool, even if you plan to use batch or line modes later.
The following list describes the maximum screen size supported by Debug Tool for
a particular type of terminal:
v In full screen mode, you can use any screen size supported by ISPF.
v In full-screen mode using the Terminal Interface Manager or a CICS terminal,
you can use a maximum screen size (number of rows times number of columns)
of 10922. If the number of rows times the number of columns is not less than
10923, Debug Tool displays a WTO error message and abends.
Note: The PF key definitions used in these topics are the default settings.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 18, “Starting a full-screen debug session,” on page 151
“Ending a full-screen debug session” on page 210
“Entering commands on the session panel” on page 167
“Navigating through Debug Tool windows” on page 175
“Recording your debug session in a log file” on page 183
“Setting breakpoints to halt your program at a line” on page 186
“Setting breakpoints in a load module that is not loaded or in a program that is
not active” on page 186
“Stepping through or running your program” on page 188
“Displaying and monitoring the value of a variable” on page 196
“Displaying error numbers for messages in the Log window” on page 209
“Displaying a list of compile units known to Debug Tool” on page 209
“Requesting an attention interrupt during interactive sessions” on page 210
Chapter 24, “Debugging a C program in full-screen mode,” on page 241
Chapter 25, “Debugging a C++ program in full-screen mode,” on page 251
Chapter 21, “Debugging a COBOL program in full-screen mode,” on page 213
Chapter 23, “Debugging a PL/I program in full-screen mode,” on page 231
Each physical window can be assigned only one logical window. The physical
window assumes the name of the logical window, so when you enter commands
that affect the physical window (for example, the WINDOW SIZE command), you
identify the physical window by providing the name of its assigned logical
window. Physical windows can be closed (not displayed), but at least one physical
window must remain open at any time.
The Debug Tool session panel below shows the default layout which contains three
physical windows: one for the Monitor window ▌1▐, a second for the Source
window ▌2▐, and the third for the Log window ▌3▐.
COBOL LOCATION: DTAM01 :> 109.1
Command ===> Scroll ===> PAGE
MONITOR -+----1----+----2----+----3----+----4----+----5----+----6- LINE: 1 OF 7
**************************** TOP OF MONITOR **********************************
----+----1----+----2----+----3----+----4----
0001 1 NUM1 0000000005
0002 2 NUM4 ’1111’ ▌1▐
0003 3 WK-LONG-FIELD-2 ’123456790 223456790 323456790 423456790 5234
0004 56790 623456790 723456790 8234567890 9234567
0005 90 023456790 123456790 223456790 323456790 4
0006 23456790 5234567890 623456790 723456790 8234
SOURCE: DTAM01 ---1----+----2----+----3----+----4----+----5--- LINE: 107 OF 196
107 * SINGLE DATAITEM IN A STRUCTURE .
108 *------------------------------------------------------------- .
109 ADD 1 TO AA-NUM1 ▌2▐ .
110 .
111 *------------------------------------------------------------- .
112 * SINGLE DATAITEM IN A STRUCTURE - QUALIFIED .
LOG 0----+----1----+----2----+----3----+----4----+----5----+---- LINE: 40 OF 43
0040 MONITOR
0041 LIST NUM4 ;
0042 MONITOR ▌3▐
0043 LIST WK-LONG-FIELD-2 ;
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Customizing the layout of physical windows on the session panel” on page
274
Related references
“Session panel header”
“Monitor window” on page 161
“Source window” on page 160
“Log window” on page 162
“Memory window” on page 163
Note:
1. Debug Tool does not differentiate between C and C++ programs. If
there is a C++ program in the Source window, only C is displayed in
this field.
2. LX COBOL is used to indicate LangX COBOL.
▌2▐ LOCATION
The program unit name and statement where execution is suspended,
usually in the form compile unit:>nnnnnn.
In the C example above, execution in MYID.SOURCE(TSTPGM1) is suspended
at line 248.
In the COBOL example above, execution in XYZPROG is suspended at
XYZPROG::>SUBR:>118, or line 118 of subroutine SUBR.
If you are replaying recorded statements, the word "LOCATION" is
replaced by PBK<LOC or PBK>LOC. The < and > symbols indicate whether the
recorded statements are being replayed in the backward (<) or forward (>)
direction.
If you are using the Enterprise PL/I compiler or the C/C++ compiler, the
compile unit name is the entire data set name of the source. If the setting
for LONGCUNAME is ON (the default) to display the CU name in long form, the
name might be truncated. If your PL/I program was compiled with the
following compiler and running in the following environment, the package
statement or the name of the main procedure is displayed.
v Enterprise PL/I for z/OS, Version 3.5, compiler with the PTFs for APARs
PK35230 and PK35489 applied, or Enterprise PL/I for z/OS, Version 3.6
or later
v Language Environment, Version 1.6 through 1.8 with the PTF for APAR
PK33738 applied, or later
▌3▐ COMMAND
The input area for the next Debug Tool command. You can enter any valid
Debug Tool command here.
Source window
▌1▐SOURCE: MULTCU ---1----+----2----+----3----+----4----+----5----+ LINE: 70 OF 85
70 PROCEDURE DIVISION. .
71 ************************************************************** .
72 * THIS IS THE MAIN PROGRAM AREA. This program only displays .
73 * text.▌3▐ .
74 ************************************************************** .
The Source window displays the source file or listing. The Source window has four
parts, described below.
▌1▐ Header area
Identifies the window, shows the compile unit name, and shows the
current position in the source or listing.
▌2▐ Prefix area
Occupies the left-most eight columns of the Source window. Contains
statement numbers or line numbers you can use when referring to the
statements in your program. You can use the prefix area to set, display, and
remove breakpoints with the prefix commands AT, CLEAR, ENABLE, DISABLE,
QUERY, and SHOW.
The labeled header line for each window contains a scale and a line counter. If you
scroll a window horizontally, the scale also scrolls to indicate the columns
displayed in the window. The line counter indicates the line number at the top of a
window and the total number of lines in that window. If you scroll a window
vertically, the line counter reflects the top line number currently displayed in that
window.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Entering prefix commands on specific lines or statements” on page 171
“Customizing profile settings” on page 277
Monitor window
The Monitor window displays the names and values of variables selected by the
SET AUTOMONITOR or MONITOR commands.
The following diagram shows the default Monitor window and highlights the
parts of the Monitor window:
COBOL LOCATION: DTAM01 :> 109.1
Command ===> Scroll ===> PAGE
MONITOR -+----1----+----2----+----3----+----4----+----5----+----6- LINE: 1 OF 7
******************************** TOP OF MONITOR *******************************
-----+----1----+----2----+-▌1▐--3----+----4--
0001 1 NUM1 0000000005
0002 2 NUM4 ’1111’ ▌2▐
0003 3 WK-LONG-FIELD-2 ’123456790 223456790 323456790 423456790 5234
0004 ▌3▐ 56790 623456790 723456790 8234567890 9234567
0005 90 023456790 123456790 223456790 323456790 4
0006 ▌4▐ 23456790 5234567890 623456790 723456790 8234
0007 4 HEX-NUM1 X’ABCD 1234’
▌1▐ Monitor value scale, which provides a reference to help you measure the
column position in the Monitor value area.
▌2▐ Monitor value area, where Debug Tool displays the values of the variables.
Debug Tool extends the display to the right up to the full width of the
displayable area of the Monitor window.
▌3▐ Monitor name area, where Debug Tool displays the names of the variables.
▌4▐ Monitor reference number area, where Debug Tool displays the reference
number it assigned to a variable.
By default, the Monitor window displays a maximum of 1000 lines. You can
change this maximum by using the SET MONITOR LIMIT command. However,
monitoring large amounts of data can use large amounts of storage, which might
create problems. Verify that there is enough storage available to monitor large data
items or data items that contain a large number of elements. To find out the
current maximum, enter the QUERY MONITOR LIMIT command.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Adding variables to the Monitor window” on page 197
“Replacing a variable in the Monitor window with another variable” on page
199
“Adding variables to the Monitor window automatically” on page 200
“Scrolling through the physical windows” on page 176
Related references
“SET MONITOR command” in Debug Tool Reference and Messages
“QUERY command” in Debug Tool Reference and Messages
Log window
LOG 0----+----1----+----2----+----3----+----4----+----5----+----6 LINE: 6 OF 14
0007 MONITOR
0008 LIST PROGRAM-USHORT-BIN ;
0009 MONITOR
0010 LIST PROGRAM-SSHORT-BIN ;
0011 AT 75 ;
0012 AT 77 ;
0013 AT 79 ;
0014 GO ;
The Log window records and displays your interactions with Debug Tool.
At the beginning of a debug session, if you have specified any of the following
files, the Log window displays messages indicating the beginning and end of any
commands issued from these files:
v global preferences file
v preferences file
v commands file
If a global preferences file exists, the data set name of the global preferences file is
displayed.
If SET INTERCEPT ON is in effect for a file, that file's output also appears in the Log
window.
You can optionally exclude STEP and GO commands from the log by specifying SET
ECHO OFF.
Commands that can be used with IMMEDIATE, such as the SCROLL and WINDOW
commands, are excluded from the Log window.
By default, the Log window keeps 1000 lines for display. The default value can be
changed by one of the following methods:
v The system administrator changes it through a global preferences file.
v You can change it through a preferences file.
v You can change it by entering SET LOG KEEP n, where n is the number of lines
you want kept for display
The labeled header line for each window contains a scale and a line counter. If you
scroll a window horizontally, the scale also scrolls to indicate the columns
displayed in the window. The line counter indicates the line number at the top of a
window and the total number of lines in that window. If you scroll a window
vertically, the line counter reflects the top line number currently displayed in that
window.
Memory window
The Memory window displays the contents of memory. The following figure
highlights the parts of the Memory window.
MEMORY---1----+----2----+----3----+----4----+----5----+----6----+----7----+- ▌1▐
History: 24702630 2505A000
▌2▐
Base address: 265B1018 Amode: 31
+00000 265B1018 11C3D6C2 D6D34040 4011D3D6 C3C1E3C9 | .COBOL .LOCATI |
+00010 265B1028 D6D57A12 D7D9D6C7 F1407A6E 40F4F44B | ON:.PROG1 :> 44. |
+00020 265B1038 F1404040 40404040 40404040 40404040 | 1 |
+00030 265B1048 40404040 40404040 40404040 40404040 | ▌6▐ |
+00040 265B1058 40404040 40404040 40404040 40404040 | |
+00050 265B1068 11C39694 94819584 117E7E7E 6E009389 | .Command.===>.li |
+00060 265B1078 A2A340A2 A3969981 87854DA2 A399F16B | st storage(str1, |
+00070 265B1088 F3F25D40 40404040 40404040 40404040 | 32) |
▌3▐ ▌4▐ ▌5▐
The following sections are collectively known as the memory dump area.
The maximum number of lines that the Memory window can display is limited to
the size of the window. You can use the SCROLL DOWN and SCROLL UP commands to
display additional memory.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Navigating through the Memory window using the history area” on page 181
You can control the size of the window by doing any of the following actions:
v When you enter the POPUP command, specify the number of lines you want for
that particular instance of a Command pop-up window
v If you want the Command pop-up window to display the same number of lines
every time you enter the POPUP command, specify the number of lines you want
with the SET POPUP command
v Resize the window by moving the cursor below the last line in the Command
pop-up window and then press Enter
After you finish entering commands, press Enter to run the commands and close
the window.
If your site has preferences for all users to use, the system administrator can set
these preferences in a global preferences file. When Debug Tool starts, it does the
following steps:
1. Checks for a global preferences file specified through the EQAOPTS GPFDSN
command and runs any commands specified in that file.
2. If you specify a preferences file, Debug Tool looks for that preferences file and
runs any commands in that preferences file. A preferences file can be specified
through one of the following methods:
v directly; for example, through the TEST runtime option
v through the EQAOPTS PREFERENCESDSN command
3. If you specify a commands file, Debug Tool looks for that commands file and
runs any commands in that commands file. A commands file can be specified
through one of the following methods:
v Directly, for example, through the TEST runtime option.
v Through the EQAOPTS COMMANDSDSN command. If that file has a member in it
that matches the name of the initial load module in the first enclave, Debug
Tool reads that member as a commands file.
Because of the order in which Debug Tool processes these files, any settings that
you specify in your preferences and commands files can override settings in the
global preferences file. To learn how to specify EQAOPTS commands, see the topic
“EQAOPTS commands” in the Debug Tool Reference and Messages or Debug Tool
Customization Guide. To learn about what format to use for the global preferences
file, preferences file, and commands file, see Appendix A, “Data sets used by
Debug Tool,” on page 439.
When you start Debug Tool, if your source is not displayed, see “Changing which
file appears in the Source window” on page 166 for instructions on how find and
display the source.
If there is no debug data, you can display the disassembled code by entering the
SET DISASSEMBLY command.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Choosing TEST or NOTEST compiler suboptions for COBOL programs” on
page 27
Chapter 5, “Preparing a LangX COBOL program,” on page 71
“Choosing TEST or NOTEST compiler suboptions for PL/I programs” on page
33
“Choosing TEST or DEBUG compiler suboptions for C programs” on page 39
“Choosing TEST or DEBUG compiler suboptions for C++ programs” on page 44
Chapter 6, “Preparing an assembler program,” on page 75
Chapter 7, “Preparing a DB2 program,” on page 79
Chapter 8, “Preparing a DB2 stored procedures program,” on page 83
Chapter 9, “Preparing a CICS program,” on page 87
Chapter 10, “Preparing an IMS program,” on page 101
Related references
Appendix B, “How does Debug Tool locate source, listing, or separate debug
files?,” on page 445
Debug Tool Reference and Messages
Before you change the file that appears in the Source window, make sure you
understand how Debug Tool locates source, listing, and separate debug files by
reading Appendix B, “How does Debug Tool locate source, listing, or separate
debug files?,” on page 445.
To change which file appears in the Source window, choose one of the following
options:
v Type over the name after SOURCE:, which is in the Header area of the Source
window, with the desired name. The new name must be the name of a compile
unit that is known to Debug Tool.
v Use the Source Identification panel to direct Debug Tool to the new files:
1. With the cursor on the command line, press PF4 (LIST).
In the Source Identification panel, you can associate the source, listing, or
separate debug file that show in the Source window with their compile unit.
2. Type over the Listing/Source File field with the new name.
v Use the SET SOURCE command. With the cursor on the command line, type SET
SOURCE ON (cuname) new_file_name, where new_file_name is the new source file.
Press Enter.
If you need to do this repeatedly, you can use the SET SOURCE ON commands
generated in the Log window. You can save these commands in a file and
reissue them with the USE command for future invocations of Debug Tool.
For C and C++ programs compiled with the FORMAT(DWARF) and FILE suboptions of
the DEBUG compiler option, the information in this topic describes how to specify
the location of the source file. If you or your site specified YES for the EQAOPTS
MDBG command (which requires Debug Tool to search for the .dbg and the source
file in a .mdbg file)7, you cannot specify another location for the source file.
7. In situations where you can specify environment variables, you can set the environment variable EQA_USE_MDBG to YES or
NO, which overrides any setting (including the default setting) of the EQAOPTS MDBG command.
Note: Figure 2 shows PF keys that were redefined. If you want to redefine your PF
keys, see “Defining PF keys” on page 273.
▌1▐ Command line
You can enter any valid Debug Tool command on the command line.
▌2▐ Scroll area
You can redefine the default amount you want to scroll by typing the
desired value over the value currently displayed.
▌3▐ Compile unit name area
You can change the qualification by typing the desired qualification over
the value currently displayed. For example, to change the current
qualification from ICFSSCU1, as shown in the Source window header, to
ICFSSCU2, type ICFSSCU2 over ICFSSCU1 and press Enter.
▌4▐ Prefix area
You can enter only Debug Tool prefix commands in the prefix area, located
in the left margin of the Source window.
▌5▐ Source window
You can modify any lines in the Source window and place them on the
command line.
▌6▐ Window id area
You can change your window configuration by typing the name of the
window you want to display over the name of the window that is
currently being displayed.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Using the session panel command line”
“Issuing system commands” on page 171
“Entering prefix commands on specific lines or statements” on page 171
“Entering multiple commands in the Memory window” on page 172
“Using commands that are sensitive to the cursor position” on page 173
“Using Program Function (PF) keys to enter commands” on page 173
“Retrieving previous commands” on page 174
“Composing commands from lines in the Log and Source windows” on page
174
Related references
“Order in which Debug Tool accepts commands from the session panel”
“Initial PF key settings” on page 173
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 28, “Entering Debug Tool commands,” on page 283
When you are entering system commands, you must comply with the following:
v A command is required after the SYSTEM keyword. Do not enter any required
parameters. Debug Tool prompts you.
v If you are debugging in batch and need system services, you can include
commands and their requisite parameters in a CLIST and substitute the CLIST
name in place of the command.
v If you want to enter several TSO commands, you can include them in a USE file,
a procedure, or other commands list. Or you can enter:
SYSTEM ISPF;
This starts ISPF and displays an ISPF panel on your host emulator screen that
you can use to issue commands.
TSO is a synonym for the SYSTEM command. Truncation of the TSO command is not
allowed.
The following prefix commands can be entered in the prefix area of the Source
window:
v AT
v CLEAR
v DISABLE
v ENABLE
v L
v M
v QUERY
v RUNTO
v SHOW
To enter a prefix command into the Source window, do the following steps:
1. Scroll through the Source window until you see the line or lines of code you
want to change.
2. Move your cursor to the prefix area of the line you want to change.
3. Type in the appropriate prefix command.
4. If there are multiple statements or verbs on the line, you can indicate which
statement or verb you want to change by typing in a number indicating the
relative position of the statement or verb. For example, if there are three
statements on the line and you want to set a breakpoint on the third statement,
type in a 3 following the AT prefix command. The resulting prefix command is
AT 3.
5. If there are more lines you want to change, return to step 3.
6. Press Enter. Debug Tool runs the commands you typed on the lines you typed
them on.
To enter a prefix command into the Monitor window, do the following steps:
1. Scroll through the Monitor window until you see the line or lines you want to
change.
2. Move your cursor to the prefix area of the line you want to change.
3. Type in the appropriate prefix command.
4. If there are more lines you want to change, return to step 3.
5. Press Enter. Debug Tool runs the commands you typed on the lines you typed
them on.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
SET MONITOR command in Debug Tool Reference and Messages
Prefix commands in Debug Tool Reference and Messages
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Defining PF keys” on page 273
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Defining PF keys” on page 273
“Using commands that are sensitive to the cursor position”
Related references
“Initial PF key settings”
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Defining PF keys” on page 273
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Composing commands from lines in the Log and Source windows”
To compose a command from lines in the Log or Source window, do the following
steps:
1. Move the cursor to the desired line.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Retrieving previous commands” on page 174
Chapter 28, “Entering Debug Tool commands,” on page 283
Related references
“COBOL command format” on page 289
“Debug Tool subset of PL/I commands” on page 307
“PL/I language statements” on page 307
“Debug Tool commands that resemble C and C++ commands” on page 319
Debug Tool automatically displays the Command pop-up window in the following
situations:
v You enter an incomplete command on the command line.
v You enter a continuation character on the command line.
You can enter the rest of your command in the Command pop-up window.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Moving the cursor between windows” on page 176
“Scrolling through the physical windows” on page 176
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Defining PF keys” on page 273
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Scrolling to a particular line number” on page 178
“Scrolling through the physical windows”
You can combine steps 2 and 3 above by using the command to indicate which
physical window you want to scroll through. For example, if you want to scroll up
5 lines in the physical window that is displaying the Monitor window, you enter
the command SCROLL UP 5 MONITOR.
If you do not move the cursor to a specific physical window, the default logical
window is scrolled. To find out which logical window is the default logical
window, enter the QUERY DEFAULT WINDOW command.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Customizing the layout of physical windows on the session panel” on page
274
“Scrolling to a particular line number” on page 178
“Customizing profile settings” on page 277
“Enlarging a physical window”
“Navigating through the Memory window using the history area” on page 181
Related references
QUERY command in Debug Tool Reference and Messages
SCROLL command in Debug Tool Reference and Messages
SET DEFAULT WINDOW command in Debug Tool Reference and Messages
To enlarge a physical window by using a PF key, move the cursor into the physical
window that you want to enlarge, then press the PF10 (ZOOM) key. For example,
if you want to enlarge the physical window that is displaying the Source window,
move your cursor somewhere into the Source window, then press the PF10
(ZOOM) key. To reduce the size of that physical window back to its original size,
press the PF10 (ZOOM) key.
For example, to bring line 345 to the top of the window, enter POSITION 345 OR
SCROLL TO 345 on the command line. Debug Tool scrolls the selected window
vertically so that it displays line 345 at the top of that window.
If you used the LIST AT LINE or LIST AT STATEMENT command to get a list of line
or statement breakpoints, then use the POSITION or SCROLL TO command to display
one of those breakpoints at the top of the Source window. As an alternate to using
the combination of the LIST AT LINE or LIST AT STATEMENT command with the
POSITION or SCROLL TO command, you can use the FINDBP command. The FINDBP
command works in a manner similar to the FIND command for strings, except that
it searches for line, statement, and offset breakpoints.
To find a string within the default window using the default search direction, do
the following steps:
1. Type in the FIND command, specifying the string you want to find. Ensure that
the string complies with the rules described “Syntax of a search string” on page
179.
2. Press Enter.
If you want to repeat the previous search, hit the PF5 key.
Refer to the following topics for more information related to the material discussed
in this topic.
Related concepts
“How does Debug Tool search for strings?”
Related references
“Syntax of a search string” on page 179
If you were searching backwards and you reach the beginning, Debug Tool
displays a message indicating you have reached the beginning. Repeat the FIND
command by pressing the PF5 key and the search begins from the end.
Use the following rules to determine whether to use quotation marks (") or
apostrophes ('):
v If you are debugging a C or C++ program, the string must be enclosed in
quotation marks (").
v If you are debugging an assembler, COBOL, LangX COBOL, disassembly, or
PL/I program, the string can be enclosed in quotation marks (") or apostrophes
(').
To specify the boundaries for the current search, enter the FIND command and
specify the search string and the boundaries. For example, to search for "ABC" in
columns 7 through 12, enter the following command:
FIND "ABC" 7 12;
To specify the default boundaries to use for all searches, enter the SET FIND BOUNDS
command, specifying the left and right boundaries. After you enter the SET FIND
BOUNDS command, every time you enter the FIND command without specifying
boundaries, Debug Tool searches for the string you specified only within those
boundaries. For example, to specify that you want Debug Tool to always search for
text within columns 7 through 52, enter the following command:
SET FIND BOUNDS 7 52;
Afterward, every time you enter the FIND command without specifying boundaries,
Debug Tool searches only within columns 7 through 52. To reset the boundaries to
the default setting, which is 1 through *, enter the following command:
SET FIND BOUNDS;
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
“Example: Searching for COBOL paragraph names”
FIND command in Debug Tool Reference and Messages
SET FIND BOUNDS command in Debug Tool Reference and Messages
QUERY command in Debug Tool Reference and Messages
Debug Tool will find only the string that starts in column 8.
Debug Tool will find only the string that starts and ends within columns 12 to 72.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Scrolling through the physical windows” on page 176
“Switching between the Memory window and Log window” on page 176
“Displaying memory through the Memory window” on page 17
“Customizing the layout of physical windows on the session panel” on page
274
Related references
“Memory window” on page 163
“Order in which Debug Tool accepts commands from the session panel” on
page 170
MEMORY command in Debug Tool Reference and Messages
To use the history area to navigate through the Memory window, enter the G or g
command over an address in the history area, then press Enter. Debug Tool
displays the memory dump data starting with the new address. You can clear the
history area by entering the CLEAR MEMORY command. You can remove an entry in
the history area by typing over the entry with the R or r command.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Scrolling through the physical windows” on page 176
“Specifying a new base address”
If you enter the G command over the second row, first column, Debug Tool
tries to set the base address to X'4040329E'. If you enter the G command over
the second row, second column, Debug Tool tries to set the base address to
X'64704040'. If you want to set the base address to X'329E6470', do one of the
following options:
- Type the G command over the address in the fifth row, third column.
- Enter X'329E6470' in the Base address field.
- Type in X'329E6470' in an address column, without spanning two columns,
and then press Enter.
When you create a commands file that might be used in an application program
that was created with several different programming languages, you might want to
use Debug Tool commands that are programming language neutral. The following
guidelines can help you write commands that are programming language neutral:
182 Debug Tool V13.1 User's Guide
v Write conditions with the %IF command.
v Delimit strings and long compile unit names with quotation marks (").
v Prefix a hexadecimal constant with an X or x, followed by an apostrophe ('),
then suffix the constant with an apostrophe ('). For example, you can write the
hexadecimal constant C1C2C3C4 as x’C1C2C3C4’.
v Group commands together with the BEGIN and END commands.
v Check the Debug Tool Reference and Messages to determine if a command works
with only specific programming languages.
v Type in comments beginning at column 2 and not extending beyond column 72.
Begin comments with "/*" and end them with "*/".
For PL/I programs, if your commands file has sequence numbers in columns 73
through 80, you must enter the SET SEQUENCE ON command as the first command in
the commands file or before you use the commands file. After you enter this
command, Debug Tool does not interpret the data in columns 73 through 80 as a
command. Later, if you want Debug Tool to interpret the data in columns 73
through 80 as a command, enter the command SET SEQUENCE OFF.
For C and C++ programs, if you use commands that reference blocks, the block
names can differ if the same program is compiled with either the ISD or DWARF
compiler option. If your program is compiled with the ISD compiler option, Debug
Tool assigns block names in a sequential manner. If your program is compiled with
the DWARF compiler option, Debug Tool assigns block names in a non-sequential
manner. Therefore, the names might differ. If you switch compiler options, check
the block names in commands you use in your commands file.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Entering comments in Debug Tool commands” on page 287
Related references
BEGIN command in Debug Tool Reference and Messages
%IF command in Debug Tool Reference and Messages
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Creating the log file”
“Saving and restoring settings, breakpoints, and monitor specifications” on
page 191
To create a permanent log of your debug session, first create a file with the
following specifications:
v RECFM(F) or RECFM(FB) and 32<=LRECL<=256
v RECFM(V) or RECFM(VB) and 40<=LRECL<=264
Then, allocate the file to the DD name INSPLOG in the CLIST, JCL, or EXEC you
use to run your program.
For COBOL and LangX COBOL only, if you want to subsequently use the session
log file as a commands file, make the RECFM FB and the LRECL equal to 72.
Debug Tool ignores everything after column 72 for file input during a COBOL
debug session.
For CICS only, SET LOG OFF is the default. To start the log, you must use the SET
LOG ON file command. For example, to have the log written to a data set named
TSTPINE.DT.LOG , issue: SET LOG ON FILE TSTPINE.DT.LOG;.
When the default log file (INSPLOG) is accessed during initialization, any existing
file with the same name is overwritten. On MVS, if the log file is allocated with
disposition of MOD, the log output is appended to the existing file. Entering the
SET LOG ON FILE xxx command also appends the log output to the existing file.
If a log file was not allocated for your session, you can allocate one with the SET
LOG command by entering:
SET LOG ON FILE logddn;
This causes Debug Tool to write the log to the file which is allocated to the DD
name LOGDDN.
Note: A sequential file is recommended for a session log since Debug Tool writes
to the log file.
At any time during your session, you can stop information from being sent to a
log file by entering:
SET LOG OFF;
The log file is active for the entire Debug Tool session.
Debug Tool keeps a log file in the following modes of operation: line mode,
full-screen mode, and batch mode.
After you have entered the SET FREQUENCY ON command, your Source window
is updated to show the current frequency count. Remember that this command
starts the statistic gathering to display the actual count, so if your application
has already executed a section of code, the data for these executed statements
will not be available.
If you want statement counts for the entire program, issue:
GO ;
LIST FREQUENCY * ;
which lists the number of times each statement is run. When you quit, the
results are written to the Log file. You can issue the LIST FREQUENCY * at any
time, but it will only display the frequency count for the currently active
compile unit.
Refer to the following topics for more information related to the material discussed
in this topic.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Halting on a line in C only if a condition is true” on page 245
“Halting on a line in C++ only if a condition is true” on page 257
“Halting on a COBOL line only if a condition is true” on page 218
“Halting on a PL/I line only if a condition is true” on page 235
In this command, specify the name of the load module and CU in which you wish
to set breakpoints. The load module is then implicitly loaded, if necessary, and a
CU is created for the specified CU. The source for the specified CU is then
displayed in the SOURCE window. You can then set statement breakpoints as
desired.
If you use the SET SAVE BPS function to save and restore breakpoints, the
breakpoints are saved and restored under the name of the first load module in the
active enclave. Therefore, if you use the command SET QUALIFY CU to set
breakpoints in programs that execute as part of different enclaves, the breakpoints
that you set by using this command are not restored when run in a different
enclave.
A conditional expression can become invalid for several reasons, including the
following situations:
v A variable is not initialized and the data in the variable is not valid for the
variable's attributes.
v A field has multiple definitions, with each definition having different attributes.
While the program is running, the type of data in the field changes. When
Debug Tool evaluates the conditional expression, the data in the variable used in
the comparison is not valid for the variable's attributes.
The following example describes what happens when you use a field that has
multiple definitions, with each definition having different attributes, as part of a
conditional expression:
1. You enter the following command to check the value of WK-TEST-NUM, which
is a field with two definitions, one is numeric, the other is string:
AT CHANGE WK-TEST-NUM
BEGIN;
IF WK-TEST-NUM = 10;
LIST ’WK-TEST-NUM IS 10’;
ELSE;
GO;
END-IF;
End;
2. When Debug Tool evaluates the conditional expression WK-TEST-NUM = 10, the
type of data in the field WK-TEST-NUM is string. Because the data in the field
WK-TEST-NUM is a string and it cannot be compared to 10, the comparison
becomes invalid. Debug Tool stops and prompts you to enter a command.
3. You decide you want Debug Tool to continue running the program and stop
only when the type of data in the field is numeric and matches the 10.
4. You enter the following command, which adds calls to the SET WARNING OFF
and SET WARNING ON commands:
AT CHANGE WK-TEST-NUM
BEGIN;
SET WARNING OFF;
IF WK-TEST-NUM = 10;
LIST ’WK-TEST-NUM IS 10’;
ELSE;
BEGIN;
SET WARNING ON;
GO;
END;
END-IF;
SET WARNING ON;
END;
In this example, the display of warning messages about the conditional expression
(WK-TEST-NUM = 10) was suppressed by entering the SET WARNING OFF command
before the conditional expression was evaluated. After the conditional expression
was evaluated, the display of warning messages was allowed by entering the SET
WARNING ON command.
Carefully consider when you enter the SET WARNING OFF command because you
might suppress the display of warning messages that might help you detect other
problems in your program.
Debug Tool defines a line as one line on the screen, commonly identified by a line
number. A statement is a language construct that represents a step in a sequence of
actions or a set of declarations. A statement can equal one line, it can span several
lines, or there can be several statements on one line. The number of statements that
Debug Tool runs when you step through your program depends on where hooks
are placed.
To run your program up to the next hook, press PF2 (STEP). If you compiled your
program with a combination of any of the following TEST or DEBUG compiler
suboptions, STEP performs one statement:
v For C, compile with TEST(ALL) or DEBUG(HOOK(LINE,NOBLOCK,PATH)).
v For C++, compile with TEST or DEBUG(HOOK(LINE,NOBLOCK,PATH)).
v For any release of Enterprise COBOL for z/OS, Version 3, or Enterprise COBOL
for z/OS and OS/390, Version 2, compile with one of the following suboptions:
– TEST(ALL)
– TEST(NONE) and use the Dynamic Debug facility
v For Enterprise COBOL for z/OS, Version 4, compile with one of the following
suboptions:
– TEST(HOOK)
– TEST(NOHOOK) and use the Dynamic Debug facility
v For any release of Enterprise PL/I for z/OS, compile with TEST(ALL).
v For Enterprise PL/I for z/OS, Version 3.4 or later, compile with
TEST(ALL,NOHOOK) and use the Dynamic Debug facility.
Note: A condition being raised is determined by the setting of the TEST run-time
suboption test_level.
The command STEP OVER runs the called function without stepping into it. If you
accidentally step into a function when you meant to step over it, issue the STEP
RETURN command that steps to the return point (just after the call point).
Each of these steps are described in more detail in the sections that follow.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Debug Tool Reference and Messages
The PLAYBACK ENABLE command can be used to record the statements that you run
for all compile units or for specific compile units. For example, you can record the
statements that you run for compile units A, B, and C, where A, B, and C are
existing compile units. Later, you can enter the PLAYBACK ENABLE command and
specify that you want to record the statements that you run for all compile units.
You can use an asterisk (*) to specify all current and future compile units.
The number of statements that Debug Tool can record depends on the following:
v The amount of storage specified or defaulted.
v The number of changes made to the variables.
v The number of changes made to files.
You can use the DATA parameter with programs compiled with the SYM suboption of
the TEST compiler option only if they are compiled with the following compilers:
v Enterprise COBOL for z/OS, Version 48
v Enterprise COBOL for z/OS and OS/390, Version 3 Release 2 or later
v Enterprise COBOL for z/OS and OS/390, Version 3 Release 1 with APAR
PQ63235
v COBOL for OS/390 & VM, Version 2 with APAR PQ63234
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Stop the recording” on page 191
You can replay as far forward as the point where you entered the PLAYBACK START
command. As you replay statements, you see only the statements that you
recorded for those compile units you indicated you wanted to record. While you
are replaying steps, you cannot modify variables. If the DATA parameter is in effect,
you can access the contents of variables and expressions.
8. With Enterprise COBOL for z/OS, Version 4, and the TEST compiler option the symbol tables are always generated.
When you replay statements, many Debug Tool commands are unavailable. Debug
Tool Reference and Messages contains a complete list of all the commands that are
not available.
You can also access special registers, except for the ADDRESS OF, LENGTH OF, and
WHEN-COMPILED special registers. You can also access all the special registers
supported by Debug Tool commands.
When you are replaying statements, many Debug Tool commands are available
only if the following conditions are met:
v The DATA parameter must be specified or defaulted for the compile unit.
v The compile unit must be compiled with a compiler that supports the DATA
parameter.
You can use the QUERY PLAYBACK command to determine the compile units for
which the DATA option is in effect.
Debug Tool Reference and Messages contains a complete list of all the commands that
can be used when you specify the DATA parameter.
In most environments, Debug Tool uses specific default data set names to save
these items so that it can automatically save and restore these items for you. In
these environments, you must automatically restore the settings so that the SET
RESTORE BPS AUTO and SET RESTORE MONITORS AUTO commands are in effect during
Debug Tool initialization. There are some environments where you have to use the
RESTORE command to restore these items manually.
In non-interactive mode (MVS batch mode without using full-screen mode using
the Terminal Interface Manager), you must include an INSPSAFE DD statement to
indicate the data set that you want Debug Tool to use to save and restore the
settings and an INSPBPM DD statement to indicate the data set that you want
Debug Tool to use to save and restore the breakpoints and monitor and LDD
specifications.
Use a sequential data set to save and restore the settings. Use a PDS or PDSE to
save and restore the breakpoints and monitor and LDD specifications. We
recommend that you use a PDSE to avoid having to compress the data set. Debug
Tool uses a separate member to store the breakpoints, LDD data, and monitor
specifications for each enclave. Debug Tool names the member the name of the
initial load module in the enclave. If you want to discard all of the saved
breakpoints, LDD data, and monitor specifications for an enclave, you can delete
the corresponding member. However, do not alter the contents of the member.
To enable automatic saving and restoring, you must do the following steps:
1. Pre-allocate a sequential data set with the default name where settings will be
saved. If you are running in non-interactive mode (MVS batch mode without
using full-screen mode using the Terminal Interface Manager), you must
include an INSPSAFE DD statement that references this data set.
2. Pre-allocate a PDSE or PDS with the default name where breakpoints, monitor,
and LDD specifications will be saved. If you are running in non-interactive
mode (MVS batch mode without using full-screen mode using the Terminal
Interface Manager), you must include an INSPBPM DD statement that
references this data set.
3. Start Debug Tool.
The next time you start Debug Tool, the settings are automatically restored. If you
are debugging the same program, the breakpoints and monitor specifications are
also automatically restored.
To disable automatic saving of settings, you must ensure that the SET SAVE
SETTINGS NOAUTO; setting is in effect.
To disable automatic restoring of breakpoints and monitors, you must ensure that
the following settings are in effect:
v SET RESTORE BPS NOAUTO;
v SET RESTORE MONITORS NOAUTO;
To disable automatic restoring of settings, you must ensure that the SET RESTORE
SETTINGS NOAUTO; setting is in effect.
If you disable the automatic saving of any of these values, the last saved data is
still present in the appropriate data sets. Therefore, you can restore from these data
sets. Be aware that this means you will restore values from the last time the data
was saved which might not be from the last time you ran Debug Tool.
Restoring manually
Automatic restoring is not supported in the following environments:
v Debugging in CICS without logging-on
v Debugging DB2 stored procedures
The next time you start Debug Tool in one of these environments, you must use
the following commands, in the sequence shown, at the beginning of your Debug
Tool session.
SET SAVE SETTINGS AUTO FILE mysetdsn;
RESTORE SETTINGS;
SET SAVE BPS AUTO FILE mybpdsn;
RESTORE BPS MONITORS;
Because each of these steps requires operating system services, the overall process
can require a significant amount of elapsed time.
For saving and restoring settings, this process is done once when Debug Tool is
activated and once when Debug Tool terminates. Therefore, unless Debug Tool is
repeatedly activated and terminated, the process is not excessively
time-consuming. However, for saving and restoring of breakpoints, monitors, or
both, this process occurs once on entry to each enclave and once on termination of
each enclave.
Note: Use the command SET LIST TABULAR to format the LIST output for arrays
and structures in tabular format. See the Debug Tool Reference and Messages for more
information about this command.
If Debug Tool cannot display the value of a variable in its declared data type, see
“How Debug Tool handles characters that cannot be displayed in their declared
data type” on page 203.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Adding variables to the Monitor window automatically” on page 200
Every time Debug Tool receives control or you enter a Debug Tool command that
can effect the display, Debug Tool updates the value of each variable in the
Monitor window so that Debug Tool always displays the current value.
Because the Working-Storage Section can contain many variables, monitoring the
Working-Storage Section can add a substantial amount of overhead and use more
storage.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Modifying variables or storage by typing over an existing value” on page 206
To display the value and data type of a variable in the Monitor window:
1. Move the cursor to the command line.
2. Enter the following command:
SET MONITOR DATATYPE ON;
3. Enter one of the following commands:
v
MONITOR LIST variable-name;
Substitute the name of your variable name for variable-name. Debug Tool
adds the variable to the Monitor window and displays the current value and
data type of the variable.
v
SET AUTOMONITOR ON;
Debug Tool adds the variable or variables in the current statement to the
automonitor section of the Monitor window and displays the current value
and data type of the variable or variables.
v
SET AUTOMONITOR ON LOG;
Debug Tool adds the variable or variables to the automonitor section of the
Monitor window, displays the current value and data type of the variable or
variables, and saves that information in the log.
If you added an element of an array to the Monitor window, you can replace that
element with another element of the same array by doing the following steps:
Before you begin, make sure you understand how the SET AUTOMONITOR command
works by reading “How Debug Tool automatically adds variables to the Monitor
window” on page 201.
Refer to the following topics for more information related to the material discussed
in this topic.
Related concepts
“How Debug Tool automatically adds variables to the Monitor window” on
page 201
Related tasks
“Saving the information in the automonitor section to the log file” on page 201
Related references
Description of the SET AUTOMONITOR command in Debug Tool Reference and
Messages.
“Example: How Debug Tool adds variables to the Monitor window
automatically” on page 202
The default option is NOLOG, which would not save the above information.
Each entry in the log file contains the breakpoint location within the program and
the names and values of the variables in the statement. To stop saving this
information in the log file and continue updating the automonitor section of the
Monitor window, enter the SET AUTOMONITOR ON NOLOG command.
Refer to the following topics for more information related to the material discussed
in this topic.
Related concepts
“How Debug Tool automatically adds variables to the Monitor window”
Related tasks
“Adding variables to the Monitor window automatically” on page 200
Related references
Description of the SET AUTOMONITOR command in Debug Tool Reference and
Messages.
“Example: How Debug Tool adds variables to the Monitor window
automatically” on page 202
The area below this line is called the automonitor section. Each time you enter the
STEP command or a breakpoint is encountered, Debug Tool does the following
tasks:
1. Removes any variable names and values displayed in the automonitor section.
2. Displays the names and values of the variables of the statement that Debug
Tool runs next. The values displayed are values before the statement is run.
This behavior displays the value of the variables before Debug Tool runs the
statement. If you want to see the value of the variables after Debug Tool runs the
statement, you can enter the SET AUTOMONITOR ON PREVIOUS command. Debug Tool
If you want to see the value of the variables before and after Debug Tool runs the
statement, you can enter the SET AUTOMONITOR ON BOTH command. Debug Tool
displays the line ********** AUTOMONITOR load-name ::> cu-name :> statement-id
********** at the bottom of the list of any monitored variables in the Monitor
window. Below this line, Debug Tool displays the names and values of the
variables on the statement that Debug Tool runs next. Then, Debug Tool displays
the line ***** Previous Statement load-name ::> cu-name :> statement-id *****
. Below this line, Debug Tool displays the names and values of the variables of the
statement that Debug Tool just ran. Each time you enter the STEP command or a
breakpoint is encountered, Debug Tool does the following tasks:
1. Removes any variable names and values displayed in the automonitor section.
2. Displays the names and values of the variables of the statement that Debug
Tool runs next. The values displayed are values before the statement is run.
3. Displays the names and the values of the variables of the statement that Debug
Tool just ran. The values displayed are values after the statement was run.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Adding variables to the Monitor window automatically” on page 200
Related references
Description of the SET AUTOMONITOR command in Debug Tool Reference and
Messages.
“Example: How Debug Tool adds variables to the Monitor window
automatically”
Before you run the statement in Line ▌1▐, enter the following command:
SET AUTOMONITOR ON ;
The name and value of the variables LOAN-AMOUNT and LOAN-AMOUNT-IN are
displayed in the automonitor section of the Monitor window. These values are the
values of the variables before you run the statement.
Enter the STEP command. Debug Tool removes LOAN-AMOUNT and LOAN-AMOUNT-IN
from the automonitor section of the Monitor window and then displays the name
and value of the variables INTEREST-RATE and INTEREST-RATE-IN. These values are
the values of the variables before you run the statement.
Related tasks
“Adding variables to the Monitor window automatically” on page 200
Related references
Description of the SET AUTOMONITOR command in Debug Tool Reference and
Messages.
Characters that cannot be displayed in their declared data type can vary from code
page to code page, but, in general, these are characters that have no corresponding
symbol that can be displayed on a screen.
To be able to modify these characters, you can use the HEX and DEF prefix
commands to help you verify which character you are modifying.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Modifying characters that cannot be displayed in their declared data type”
To display the value of the monitored variables wrapped in the Monitor window,
enter the SET MONITOR WRAP ON command. To display the value of the monitored
variables in a scrollable line, enter the SET MONITOR WRAP OFF command after you
enter the SET MONITOR COLUMN ON command.
Debug Tool displays the value of the variable variable-name in hexadecimal format.
If you defined a PF key with the LIST %HEX command, do the following steps:
1. If the variable is not displayed in the Source window, scroll through your
program until the variable you want is displayed in the Source window.
2. Move your cursor to the variable name.
3. Press the PF key to which you defined LIST %HEX command. Debug Tool
displays the value of the variable variable-name in hexadecimal format.
You cannot define a PF key with the PL/I HEX built-in function.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Entering prefix commands on specific lines or statements” on page 171
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Displaying values of COBOL variables” on page 292
“Displaying values of C and C++ variables or expressions” on page 320
“Accessing PL/I program variables” on page 311
“Displaying and modifying the value of assembler variables or storage” on
page 269
If you type quotation marks (") or apostrophes (') in the Monitor value area,
carefully verify that they comply with any applicable quotation rules.
If the Monitor window is open before you enter the SET AUTOMONITOR OFF
command and you are watching the value of variables not monitored by SET
AUTOMONITOR ON, the Monitor window remains open.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Scrolling through the physical windows” on page 176
“Switching between the Memory window and Log window” on page 176
“Displaying memory through the Memory window” on page 17
“Customizing the layout of physical windows on the session panel” on page
274
Related references
“Memory window” on page 163
“Order in which Debug Tool accepts commands from the session panel” on
page 170
MEMORY command in Debug Tool Reference and Messages
The character data column is the character representation of the data and is only
for viewing purposes.
To view a current list of allocated files, enter the DESCRIBE ALLOCATIONS command.
The following screen displays the command and sample output:
You can allocate files to an existing, cataloged data set by using the ALLOCATE
command.
By default, the DESCRIBE ALLOCATIONS command lists the files allocated by the
current user. You can specify other parameters to list other system allocations, such
as the data sets currently allocated to LINK list, LPA list, APF list, system catalogs,
Parmlib, and Proclib. The Debug Tool Reference and Messages describes the
parameters you must specify to list this information.
Either modify your profile or use the SET MSGID ON command. To modify your
profile, use the PANEL PROFILE command and set Show message ID numbers to
YES by typing over the NO.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Customizing profile settings” on page 277
To determine which compile units are known to Debug Tool, do one of the
following options:
v Enter the LIST NAMES CUS command.
v If you are debugging an assembler or disassembly program, enter the SET
DISASSEMBLY ON or SET ASSEMBLER ON command, then enter the LIST NAMES CUS
command.
After you run the LIST NAMES CUS command, Debug Tool displays a list of compile
units in the Log window. You can use this list to compose a SET QUALIFY CU
command by typing in the words "SET QUALIFY CU" over the name of a compile
unit. Then press Enter. Debug Tool displays the command constructed from the
words that you typed in and the name of the compile unit. Press Enter again to
run the command.
For example, after you enter the LIST NAMES CUS command, Debug Tool displays
the following lines in the Log window:
USERID.MFISTART.C(CALC)
USERID.MFISTART.C(PUSHPOP)
USERID.MFISTART.C(READTOKN)
If you type "SET QUALIFY CU" over the last line, then press Enter, Debug Tool
composes the following command into the command line: SET QUALIFY CU
"USERID.MFISTART.C(READTOKN)". Press Enter and Debug Tool runs the command.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Changing which file appears in the Source window” on page 166
An attention interrupt should not be confused with the ATTENTION condition. If you
set an AT OCCURRENCE or ON ATTENTION, the commands associated with that
breakpoint are not run at an attention interrupt.
Language Environment TRAP and INTERRUPT run-time options should both be set to
ON in order for attention interrupts that are recognized by the host operating
system to be also recognized by Language Environment. The test_level suboption of
the TEST run-time option should not be set to NONE.
For MVS only: For C, when using an attention interrupt, use SET INTERCEPT ON
FILE stdout to intercept messages to the terminal. This is required because
messages do not go to the terminal after an attention interrupt.
For the Dynamic Debug facility only: The Dynamic Debug facility supports
attention interrupts only for programs that have compiled-in hooks.
The correct key might not be marked ATTN on every keyboard. Often the
following keys are used:
v Under TSO: PA1 key
v Under IMS: PA1 key
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Starting a debugging session in full-screen mode using the Terminal Interface
Manager or a dedicated terminal” on page 139
Related references
z/OS Language Environment Programming Guide
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Debug Tool Reference and Messages
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 29, “Debugging COBOL programs,” on page 289
“Halting when certain routines are called in COBOL” on page 216
“Modifying the value of a COBOL variable” on page 217
“Halting on a COBOL line only if a condition is true” on page 218
“Debugging COBOL when only a few parts are compiled with TEST” on page
218
“Capturing COBOL I/O to the system console” on page 219
“Displaying raw storage in COBOL” on page 219
“Getting a COBOL routine traceback” on page 220
“Tracing the run-time path for COBOL code compiled with TEST” on page 220
“Generating a COBOL run-time paragraph trace” on page 221
“Finding unexpected storage overwrite errors in COBOL” on page 222
“Halting before calling an invalid program in COBOL” on page 222
This program calls two subprograms to calculate a loan payment amount and the
future value of a series of cash flows. It uses several COBOL intrinsic functions.
PROCEDURE DIVISION.
DISPLAY "CALC Begins." UPON CONSOLE.
MOVE 1 TO BUFFER-PTR.
MOVE SPACES TO INPUT-1.
* Keep processing data until END requested
PERFORM ACCEPT-INPUT UNTIL INPUT-1 EQUAL TO "END".
* END requested
DISPLAY "CALC Ends." UPON CONSOLE.
GOBACK.
* End of program.
*
* Accept input data from buffer
*
ACCEPT-INPUT.
MOVE BUFFER-ARRAY (BUFFER-PTR) TO INPUT-1.
ADD 1 BUFFER-PTR GIVING BUFFER-PTR.
* Allow input data to be in UPPER or lower case
EVALUATE FUNCTION UPPER-CASE(INPUT-1) ▌CALC1▐
WHEN "END"
MOVE "END" TO INPUT-1
WHEN "LOAN"
PERFORM CALCULATE-LOAN
WHEN "PVALUE"
PERFORM CALCULATE-VALUE
WHEN OTHER
DISPLAY "Invalid input: " INPUT-1
END-EVALUATE.
*
* Calculate Loan via CALL to subprogram
*
CALCULATE-LOAN.
CALL "COBLOAN" USING CALL-FEEDBACK.
IF CALL-FEEDBACK IS NOT EQUAL "OK" THEN
DISPLAY "Call to COBLOAN Unsuccessful.".
*
* Calculate Present Value via CALL to subprogram
*
CALCULATE-VALUE.
CALL "COBVALU" USING CALL-FEEDBACK.
IF CALL-FEEDBACK IS NOT EQUAL "OK" THEN
DISPLAY "Call to COBVALU Unsuccessful.".
Subroutine COBLOAN
**********************************************************
* COBLOAN *
* *
* A simple subprogram that calculates payment amount *
* for a loan. *
* *
**********************************************************
IDENTIFICATION DIVISION.
PROGRAM-ID. COBLOAN.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 FIELDS.
05 INPUT-1 PIC X(26).
05 PAYMENT PIC S9(9)V99 USAGE COMP.
05 PAYMENT-OUT PIC $$$$,$$$,$$9.99 USAGE DISPLAY.
05 LOAN-AMOUNT PIC S9(7)V99 USAGE COMP.
05 LOAN-AMOUNT-IN PIC X(16).
05 INTEREST-IN PIC X(5).
05 INTEREST PIC S9(3)V99 USAGE COMP.
Subroutine COBVALU
**********************************************************
* COBVALU *
* *
* A simple subprogram that calculates present value *
* for a series of cash flows. *
* *
**********************************************************
IDENTIFICATION DIVISION.
PROGRAM-ID. COBVALU.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 CHAR-DATA.
05 INPUT-1 PIC X(10).
05 PAYMENT-OUT PIC $$$$,$$$,$$9.99 USAGE DISPLAY.
05 INTEREST-IN PIC X(5).
05 NO-OF-PERIODS-IN PIC X(3).
05 INPUT-BUFFER PIC X(10) VALUE "5069837544".
05 BUFFER-ARRAY REDEFINES INPUT-BUFFER
OCCURS 5 TIMES
PIC XX.
05 OUTPUT-LINE PIC X(79).
01 NUM-DATA.
05 PAYMENT PIC S9(9)V99 USAGE COMP.
05 INTEREST PIC S9(3)V99 USAGE COMP.
05 COUNTER PIC 99 USAGE COMP.
05 NO-OF-PERIODS PIC 99 USAGE COMP.
05 VALUE-AMOUNT OCCURS 99 PIC S9(7)V99 COMP.
LINKAGE SECTION.
01 PARM-1.
05 CALL-FEEDBACK PIC XX.
PROCEDURE DIVISION USING PARM-1.
MOVE "NO" TO CALL-FEEDBACK.
MOVE ".12 5 " TO INPUT-1.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 21, “Debugging a COBOL program in full-screen mode,” on page 213
To use the AT CALL command, you must compile the calling program with the TEST
compiler option.
To use the AT ENTRY command, you must compile the called program with the TEST
compiler option.
To halt just after COBVALU is called and only when CALL-FEEDBACK equals OK,
enter the following command:
AT ENTRY COBVALU WHEN CALL-FEEDBACK = "OK" ;
The Debug Tool Log window displays something similar to the following example:
QUERY LOCATION ;
You were prompted because STEP ended.
The program is currently entering block COBVALU.
To list the contents of a single variable, move the cursor to an occurrence of the
variable name in the Source window and press PF4 (LIST). Remember that Debug
Tool starts after program initialization but before symbolic COBOL variables are
initialized, so you cannot view or modify the contents of variables until you have
performed a step or run. The value is displayed in the Log window. This is
equivalent to entering LIST TITLED variable on the command line. Run the
COBCALC program to the statement labeled ▌CALC1▐, and enter AT 46 ; GO ; on
the Debug Tool command line. Move the cursor over INPUT-1 and press LIST (PF4).
The following appears in the Log window:
LIST ( INPUT-1 ) ;
INPUT-1 = ’LOAN ’
Now step into the call to COBVALU by pressing PF2 (STEP) and step until the
statement labeled ▌VALU2▐ is reached. To view the attributes of the variable
INTEREST, issue the Debug Tool command:
DESCRIBE ATTRIBUTES INTEREST ;
You can use this action as a simple browser for group items and data hierarchies.
For example, you can list all the values of the elementary items for the
CHAR-DATA group with the command:
LIST CHAR-DATA ;
Note: If you use the LIST command to list the contents of an uninitialized variable,
or a variable that contains invalid data, Debug Tool displays INVALID DATA.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Using COBOL variables with Debug Tool” on page 291
For example, in COBVALU you want to stop at the calculation of present value
only if the discount rate is less than or equal to -1 (before the exception occurs).
First run COBCALC, step into COBVALU, and stop at the statement labeled
▌VALU1▐. To accomplish this, issue these Debug Tool commands at the start of
COBCALC:
AT 67 ; GO ;
CLEAR AT 67 ; STEP 4 ;
Line 44 is the statement labeled ▌VALU3▐. The command causes Debug Tool to stop
at line 44. If the value of INTEREST is greater than -1, the program continues. The
command causes Debug Tool to remain on line 44 only if the value of INTEREST is
less than or equal to -1.
To force the discount rate to be negative, enter the Debug Tool command:
MOVE ’-2 5’ TO INPUT-1 ;
Run the program by issuing the GO command. Debug Tool halts the program at
line 44. Display the contents of INTEREST by issuing the LIST INTEREST command.
To view the effect of this breakpoint when the discount rate is positive, begin a
new debug session and repeat the Debug Tool commands shown in this section.
However, do not issue the MOVE ’-2 5’ TO INPUT-1 command. The program
execution does not stop at line 44 and the program runs to completion.
Debugging COBOL when only a few parts are compiled with TEST
“Example: sample COBOL program for debugging” on page 213
Suppose you want to set a breakpoint at entry to COBVALU. COBVALU has been
compiled with TEST but the other programs have not. Debug Tool comes up with
an empty Source window. You can use the LIST NAMES CUS command to determine
if the COBVALU compile unit is known to Debug Tool and then set the
appropriate breakpoint using either the AT APPEARANCE or the AT ENTRY command.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Halting when certain routines are called in COBOL” on page 216
For example, if you run COBCALC and issue the Debug Tool SET INTERCEPT ON
CONSOLE command, followed by the STEP 3 command, you will see the following
output displayed in the Debug Tool Log window:
SET INTERCEPT ON CONSOLE ;
STEP 3 ;
CONSOLE : CALC Begins.
The phrase CALC Begins. is displayed by the statement DISPLAY "CALC Begins."
UPON CONSOLE in COBCALC.
The SET INTERCEPT ON CONSOLE command not only captures output to the system
console, but also allows you to input data from your Debug Tool terminal instead
of the system console by using the Debug Tool INPUT command. For example, if
the next COBOL statement executed is ACCEPT INPUT-DATA FROM CONSOLE, the
following message appears in the Debug Tool Log window:
CONSOLE : IGZ0000I AWAITING REPLY.
The program is waiting for input from CONSOLE.
Use the INPUT command to enter 114 characters for the intercepted
fixed-format file.
Note: Whenever Debug Tool intercepts system console I/O, and for the duration
of the intercept, the display in the Source window is empty and the Location field
in the session panel header at the top of the screen shows Unknown.
You can also display only a section of the data. For example, to display the storage
that starts at offset 4 for a length of 6 characters, enter:
LIST STORAGE(BUFFER-DATA,4,6)
For example, if you run the COBCALC example with the commands:
AT APPEARANCE COBVALU AT ENTRY COBVALU;
GO;
GO;
LIST CALLS;
Tracing the run-time path for COBOL code compiled with TEST
To trace a program showing the entry and exit points without requiring any
changes to the program, place the following Debug Tool commands in a file or
data set and USE them when Debug Tool initially displays your program.
Assuming you have a PDS member, USERID.DT.COMMANDS(COBCALC), that
contains the following Debug Tool commands:
* Commands in a COBOL USE file must be coded in columns 8-72.
* If necessary, commands can be continued by coding a ’-’ in
* column 7 of the continuation line.
01 LEVEL PIC 99 USAGE COMP;
MOVE 1 TO LEVEL;
AT ENTRY * PERFORM;
COMPUTE LEVEL = LEVEL + 1;
LIST ( "Entry:", LEVEL, %CU);
GO;
END-PERFORM;
AT EXIT * PERFORM;
LIST ( "Exit:", LEVEL);
COMPUTE LEVEL = LEVEL - 1;
GO;
END-PERFORM;
You can use this file as the source of commands to Debug Tool by entering the
following command:
USE USERID.DT.COMMANDS(COBCALC)
If you do not want to create the USE file, you can enter the commands through the
command line, and the same effect is achieved.
When Debug Tool initially displays your program, enter the following command:
USE USERID.DT.COMMANDS(COBCALC2)
After executing the USE file, you can run COBCALC and the following trace (or
similar) is displayed in the Log window:
59 CALCULATE-LOAN.
42 ACCEPT-INPUT.
66 CALCULATE-VALUE.
64 GET-AMOUNTS.
64 GET-AMOUNTS.
64 GET-AMOUNTS.
64 GET-AMOUNTS.
64 GET-AMOUNTS.
42 ACCEPT-INPUT.
66 CALCULATE-VALUE.
64 GET-AMOUNTS.
64 GET-AMOUNTS.
64 GET-AMOUNTS.
64 GET-AMOUNTS.
64 GET-AMOUNTS.
42 ACCEPT-INPUT.
Suppose the result is X'0000F559'. To set a breakpoint that watches for a change in
storage values starting at that address for the next 8 bytes, issue the command:
AT CHANGE %STORAGE(H’0000F559’,8)
When the program runs, Debug Tool halts if the value in this storage changes.
When Debug Tool stops at this breakpoint, you can bypass the CALL by entering
the GO BYPASS command. This allows you to continue your debug session without
raising a condition.
As you read through the information in this document, remember that OS/VS
COBOL programs are non-Language Environment programs, even though you
might have used Language Environment libraries to link and run your program.
COB03O
******************************************************
* PROGRAM NAME: COB03O *
* *
* COMPILED WITH IBM OS/VS COBOL COMPILER *
******************************************************
* JULIAN DATE
01 JULIAN-DATE PIC 9(7).
01 J-DATE REDEFINES JULIAN-DATE.
05 J-YEAR PIC 9(4).
05 J-DAY PIC 9(3).
* SAVE DATE
01 SAVE-DATE PIC 9(7).
PROCEDURE DIVISION.
PROG.
ACCEPT JULIAN-DATE FROM DAY
DISPLAY ’JULIAN DATE: ’ JULIAN-DATE
MOVE JULIAN-DATE TO SAVE-DATE
STOP RUN.
COB03AO
******************************************************
* PROGRAM NAME: COB03AO *
* *
* COMPILED WITH IBM OS/VS COBOL COMPILER *
******************************************************
IDENTIFICATION DIVISION.
PROGRAM-ID. COB03AO.
******************************************************************
* *
PROG.
COMPUTE INTEREST = LOANAMT * INTEREST-RATE.
DISPLAY ’INTEREST-RATE: ’ INTEREST-RATE.
GOBACK.
After you have entered an LDD command for a CU, you cannot view the CU as a
disassembly CU.
If Debug Tool cannot find the associated debug data after you have entered an LDD
command, the CU is a LangX COBOL CU rather than a disassembly CU. You
cannot enter another LDD command for this CU. However, you can enter a SET
DEFAULT LISTING command or a SET SOURCE command to cause the associated
debug data to be loaded from a different data set.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Defining a compilation unit as LangX COBOL and loading debug information”
on page 227
To halt after the COB03AO routine is called, enter the following command:
AT ENTRY COB03AO ;
The AT CALL command is not supported for LangX COBOL routines. Do not use
the AT CALL command to halt Debug Tool when a LangX COBOL routine is called.
The Debug Tool Log window displays a message similar to the following message:
QUERY LOCATION
You are executing commands in the ENTRY COB03O ::> COB03AO breakpoint.
The program is currently entering block COB03O ::> COB03AO.
For example, run the COB03O program to the CALL statement by entering AT 56 ;
GO ; on the Debug Tool command line. Move the cursor over LOAN and press PF4
(LIST). Debug Tool displays the following message in the Log window:
LIST ( ’LOAN ’)
LOAN = 10000
To change the value of LOAN to 100, type ’LOAN’ = ’100’ in the command line
and press Enter.
In the COB03AO program, to halt Debug Tool when the LOANAMT variable is set
to 100, enter the following command:
AT 36 DO; IF ’LOANAMT ¬= 100’ THEN GO; END;
Suppose you want to set a breakpoint at the entry point to COB03AO program and
that debug information is available for COB03AO but not for COB03O. In this
circumstance, Debug Tool would display an empty Source window. To display a
list of compile units known to Debug Tool, enter the following commands:
SET ASSEMBLER ON
LIST NAMES CUS
For example, if you run the example with the following commands, the Log
window displays the traceback of callers:
LDD (COB03O,COB03AO) ;
AT ENTRY COB03AO ;
GO ;
LIST CALLS ;
When the program runs, Debug Tool stops if the value of LOAN changes.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 31, “Debugging PL/I programs,” on page 307
“Halting when certain PL/I functions are called” on page 234
“Modifying the value of a PL/I variable” on page 235
“Halting on a PL/I line only if a condition is true” on page 235
“Debugging PL/I when only a few parts are compiled with TEST” on page 236
“Displaying raw storage in PL/I” on page 236
“Getting a PL/I function traceback” on page 236
“Tracing the run-time path for PL/I code compiled with TEST” on page 237
“Finding unexpected storage overwrite errors in PL/I” on page 238
“Halting before calling an undefined program in PL/I” on page 238
This program is a simple calculator that reads its input from a character buffer. If
integers are read, they are pushed on a stack. If one of the operators (+ - * /) is
read, the top two elements are popped off the stack, the operation is performed on
them and the result is pushed on the stack. The = operator writes out the value of
the top element of the stack to a buffer.
TOK function
atoi: procedure(tok) returns (fixed bin(31,0));
/*------------------------------------------------------------------*/
/* */
/* convert character string to number */
/* (note: string validated by readtok) */
/* */
/*------------------------------------------------------------------*/
dcl 1 tok char (100) varying;
dcl 1 num fixed bin (31,0);
dcl 1 j fixed bin(15,0);
num = 0;
do j = 1 to length(tok);
num = (10 * num) + (index(’0123456789’,substr(tok,j,1))-1);
end;
return (num);
end atoi;
end plicalc;
POP function
pop: procedure(stack) returns (fixed bin(31,0));
/*------------------------------------------------------------------*/
/* */
/* a simple pop function for a stack of integers */
/* */
/*------------------------------------------------------------------*/
dcl 1 stack connected,
2 stkptr fixed bin(15,0),
2 stknum(50) fixed bin(31,0);
stkptr = stkptr - 1;
return (stknum(stkptr+1));
end pop;
READTOK function
readtok: procedure(bufin) returns (char (100) varying);
/*------------------------------------------------------------------*/
/* */
/* a function to read input and tokenize it for a simple calculator */
/* */
/* action: get next input char, update index for next call */
/* return: next input char(s) */
/*------------------------------------------------------------------*/
dcl length builtin;
dcl substr builtin;
dcl verify builtin;
dcl 1 bufin connected,
2 bufptr fixed bin(15,0),
2 bufchr char (100) varying;
dcl 1 tok char (100) varying;
dcl 1 tstop char(1) init (’s’);
dcl 1 j fixed bin(15,0);
/* start of processing */
if bufptr > length(bufchr) then do;
tok = tstop;
return ( tok );
end;
bufptr = bufptr + 1;
do while (substr(bufchr,bufptr,1) = ’ ’);
bufptr = bufptr + 1;
if bufptr > length(bufchr) then do;
tok = tstop;
return ( tok );
end;
end;
tok = substr(bufchr,bufptr,1); /* get ready to return single char */
select (tok);
when (’+’,’-’,’/’,’*’,’=’)
bufptr = bufptr;
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 23, “Debugging a PL/I program in full-screen mode,” on page 231
To use the AT CALL command, you must compile the calling program with the TEST
compiler option.
To use the AT ENTRY command, you must compile the called program with the TEST
compiler option.
To halt just after TOK is called and only when the parameter tok equals 2, enter
the following command:
AT ENTRY TOK WHEN tok=’2’;
The Debug Tool Log window displays something similar to the following example:
QUERY LOCATION ;
You are executing commands in the ENTRY READTOK breakpoint.
The program is currently entering block READTOK.
To modify the value of NUM to 22, type over the NUM = 18 line with NUM = 22,
press Enter to put it on the command line, and press Enter again to issue the
command.
Now step into the call to PUSH by pressing PF2 (STEP) and step until the statement
labeled ▌PUSH1▐ is reached. To view the attributes of variable STKNUM, enter the
Debug Tool command:
DESCRIBE ATTRIBUTES STKNUM;
You can list all the values of the members of the structure pointed to by STACK with
the command:
LIST STACK;
You can change the value of a structure member by issuing the assignment as a
command as in the following example:
STKNUM(STKPTR) = 33;
For example, in PLICALC you want to stop at the division selection only if the
divisor is 0 (before the exception occurs). Set the breakpoint like this:
AT 31 DO; IF NUM ^= 0 THEN GO; END;
Debugging PL/I when only a few parts are compiled with TEST
“Example: sample PL/I program for debugging” on page 231
Suppose you want to set a breakpoint at entry to subroutine PUSH. PUSH has
been compiled with TEST, but the other files have not. Debug Tool comes up with
an empty Source window. To display the compile units, enter the command:
LIST NAMES CUS
The LIST NAMES CUS command displays a list of all the compile units that are
known to Debug Tool. If PUSH is fetched later on by the application, this compile
unit might not be known to Debug Tool. If it is displayed, enter:
SET QUALIFY CU PUSH
AT ENTRY PUSH;
GO ;
The only purpose for this appearance breakpoint is to gain control the first time a
function in the PUSH compile unit is run. When that happens, you can set a
breakpoint at entry to PUSH like this:
AT ENTRY PUSH;
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Displaying and modifying memory through the Memory window” on page
206
For example, if you run the PLICALC example with the commands:
Tracing the run-time path for PL/I code compiled with TEST
To trace a program showing the entry and exit points without changing the
program, you can enter the commands described in step 1 by using a commands
file or by entering the commands individually. To use a commands file, do the
following steps:
1. Create a PDS member with a name similar to the following name:
userid.DT.COMMANDS(PLICALL)
2. Edit the file or data set and add the following Debug Tool commands:
SET PROGRAMMING LANGUAGE PLI ;
DCL LVLSTR CHARACTER (50);
DCL LVL FIXED BINARY (15);
LVL = 0;
AT ENTRY *
DO;
LVLSTR = ’ ’ ;
LVL = LVL + 1 ;
LVLSTR = ’ENTERING >’ || %BLOCK;
LIST UNTITLED ( LVLSTR ) ;
GO ;
END;
AT EXIT *
DO;
LVLSTR = ’EXITING < ’ || %BLOCK;
LIST UNTITLED ( LVLSTR ) ;
LVL = LVL - 1 ;
GO ;
END;
3. Start Debug Tool.
4. Enter the following command:
USE DT.COMMANDS(PLICALL)
5. Run your program sequence. Debug Tool displays the trace in the Log window.
For example, after you enter the USE command, you run the following program
sequence:
*PROCESS MACRO,OPT(TIME);
*PROCESS S STMT TEST(ALL);
INIT(’STACK(20K,20K),TEST’);
CALL PLISUB;
PLISUB: PROC;
CALL PLISUB1;
END PLISUB;
PLISUB1: PROC;
CALL PLISUB2;
END PLISUB1;
PLISUB2: PROC;
In the Log window, Debug Tool displays a trace similar to the following trace:
’ENTERING >PLICALL ’
’ENTERING >PLISUB ’
’ENTERING >PLISUB1 ’
’ENTERING >PLISUB2 ’
’EXITING < PLISUB2 ’
’EXITING < PLISUB1 ’
’EXITING < PLISUB ’
’EXITING < PLICALL ’
Suppose the result is X'00521D42'. To set a breakpoint that watches for a change in
storage values starting at that address for the next 8 bytes, issue the command:
AT CHANGE %STORAGE(’00521D42’px,8)
When the program is run, Debug Tool halts if the value in this storage changes.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 32, “Debugging C and C++ programs,” on page 319
“Halting when certain functions are called in C” on page 244
“Modifying the value of a C variable” on page 245
“Halting on a line in C only if a condition is true” on page 245
“Debugging C when only a few parts are compiled with TEST” on page 246
“Capturing C output to stdout” on page 246
“Calling a C function from Debug Tool” on page 247
“Displaying raw storage in C” on page 247
“Debugging a C DLL” on page 248
“Getting a function traceback in C” on page 248
“Tracing the run-time path for C code compiled with TEST” on page 248
“Finding unexpected storage overwrite errors in C” on page 249
“Finding uninitialized storage errors in C” on page 249
“Halting before calling a NULL C function” on page 250
This program is a simple calculator that reads its input from a character buffer. If
integers are read, they are pushed on a stack. If one of the operators (+ - * /) is
read, the top two elements are popped off the stack, the operation is performed on
them, and the result is pushed on the stack. The = operator writes out the value of
the top element of the stack to a buffer.
CALC.H
/*----- FILE CALC.H --------------------------------------------------*/
/* */
/* Header file for CALC.C PUSHPOP.C READTOKN.C */
/* a simple calculator */
/*--------------------------------------------------------------------*/
typedef enum toks {
T_INTEGER,
T_PLUS,
T_TIMES,
T_MINUS,
T_DIVIDE,
T_EQUALS,
T_STOP
} Token;
Token read_token(char buf[]);
typedef struct int_link {
struct int_link * next;
int i;
} IntLink;
typedef struct int_stack {
CALC.C
/*----- FILE CALC.C --------------------------------------------------*/
/* */
/* A simple calculator that does operations on integers that */
/* are pushed and popped on a stack */
/*--------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include "calc.h"
IntStack stack = { 0 };
main()
{
Token tok;
char word[100];
char buf_out[100];
int num, num2;
for(;;)
{
tok=read_token(word);
switch(tok)
{
case T_STOP:
break;
case T_INTEGER:
num = atoi(word);
push(&stack,num); /* ▌CALC1▐ statement */
break;
case T_PLUS:
push(&stack, pop(&stack)+pop(&stack) );
break;
case T_MINUS:
num = pop(&stack);
push(&stack, num-pop(&stack));
break;
case T_TIMES:
push(&stack, pop(&stack)*pop(&stack));
break;
case T_DIVIDE:
num2 = pop(&stack);
num = pop(&stack);
push(&stack, num/num2); /*▌CALC2▐ statement */
break;
case T_EQUALS:
num = pop(&stack);
sprintf(buf_out,"= %d ",num);
push(&stack,num);
break;
}
if (tok==T_STOP)
break;
}
return 0;
}
PUSHPOP.C
/*----- FILE PUSHPOP.C -----------------------------------------------*/
/* */
/* A push and pop function for a stack of integers */
/*--------------------------------------------------------------------*/
#include <stdlib.h>
#include "calc.h"
}
/*--------------------------------------------------------------------*/
/* return: int value popped from stack */
/* action: pops top element from stack and gets return value from it */
/*--------------------------------------------------------------------*/
extern int pop(IntStack * stk)
{
IntLink * ptr;
int num;
ptr = stk–>top;
num = ptr–>i;
stk–>top = ptr–>next;
free(ptr);
return num;
}
READTOKN.C
/*----- FILE READTOKN.C ----------------------------------------------*/
/* */
/* A function to read input and tokenize it for a simple calculator */
/*--------------------------------------------------------------------*/
#include <ctype.h>
#include <stdio.h>
#include "calc.h"
/*--------------------------------------------------------------------*/
/* action: get next input char, update index for next call */
/* return: next input char */
/*--------------------------------------------------------------------*/
static char nextchar(void)
{
/*--------------------------------------------------------------------*/
/* input action: */
/* 2 push 2 on stack */
/* 18 push 18 */
/* + pop 2, pop 18, add, push result (20) */
/* = output value on the top of the stack (20) */
/* 5 push 5 */
/* / pop 5, pop 20, divide, push result (4) */
/* = output value on the top of the stack (4) */
/*--------------------------------------------------------------------*/
char * buf_in = "2 18 + = 5 / = ";
static int index; /* starts at 0 */
char ret;
ret = buf_in[index];
++index;
return ret;
}
/*--------------------------------------------------------------------*/
/* output: buf - null terminated token */
/* return: token type */
/* action: reads chars through nextchar() and tokenizes them */
/*--------------------------------------------------------------------*/
Token read_token(char buf[])
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 24, “Debugging a C program in full-screen mode,” on page 241
To use the AT CALL command, you must compile the calling program with the TEST
compiler option.
To use the AT ENTRY command, you must compile the called program with the TEST
compiler option.
To halt just after push is called and only when num equals 16, enter the following
command:
AT ENTRY push WHEN num=16;
Run the CALC program above to the statement labeled ▌CALC1▐, move the cursor
over num and press PF4 (LIST). The following appears in the Log window:
LIST ( num ) ;
num = 2
To modify the value of num to 22, type over the num = 2 line with num = 22, press
Enter to put it on the command line, and press Enter again to issue the command.
Now step into the call to push() by pressing PF2 (STEP) and step until the
statement labeled PUSHPOP2 is reached. To view the attributes of variable ptr,
issue the Debug Tool command:
DESCRIBE ATTRIBUTES *ptr;
You can list all the values of the members of the structure pointed to by ptr with
the command:
LIST *ptr ;
You can change the value of a structure member by issuing the assignment as a
command as in the following example:
(* ptr).i = 33 ;
Line 40 is the statement labeled ▌CALC2▐. The command causes Debug Tool to stop
at line 40. If the value of num2 is not 0, the program continues. You can enter
Debug Tool commands to change the value of num2 to a nonzero value.
Suppose you want to set a breakpoint at entry to the function push() in the file
PUSHPOP.C. PUSHPOP.C has been compiled with TEST but the other files have
not. Debug Tool comes up with an empty Source window. To display the compile
units, enter the command:
LIST NAMES CUS
The LIST NAMES CUS command displays a list of all the compile units that are
known to Debug Tool. Depending on the compiler you are using, or if
"USERID.MFISTART.C(PUSHPOP)" is fetched later on by the application, this compile
unit might not be known to Debug Tool. If it is displayed, enter:
SET QUALIFY CU "USERID.MFISTART.C(PUSHPOP)"
AT ENTRY push;
GO ;
or
AT ENTRY "USERID.MFISTART.C(PUSHPOP)":>push
GO;
The only purpose for this appearance breakpoint is to gain control the first time a
function in the PUSHPOP compile unit is run. When that happens, you can set
breakpoints at entry to push():
AT ENTRY push;
With this SET command, you will capture not only stdout from your program, but
also from interactive function calls. For example, you can interactively call printf
on the command line to display a null-terminated string by entering:
printf(sptr);
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Debug Tool Reference and Messages
Below, we call push() interactively to push one more value on the stack just before
a value is popped off.
AT CALL pop ;
GO ;
push(77);
GO ;
The calculator produces different results than before because of the additional
value pushed on the stack.
If the string is null terminated, you can also use an interactive function call on the
command line, as in:
puts(ptr) ;
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Displaying and modifying memory through the Memory window” on page
206
Build PUSHPOP.C as a DLL, exporting push() and pop(). Build CALC.C and
READTOKN.C as the program that imports push() and pop() from the DLL
named PUSHPOP. When the application CALC starts the DLL, PUSHPOP will not
be known to Debug Tool. Use the AT APPEARANCE breakpoint to gain control in the
DLL the first time code in that compile unit appears, as shown in the following
example:
AT APPEARANCE "USERID.MFISTART.C(PUSHPOP)" ;
GO ;
The only purpose of this appearance breakpoint is to gain control the first time a
function in the PUSHPOP compile unit is run. When this happens, you can set
breakpoints in PUSHPOP.
For example, if you run the CALC example with the commands:
AT ENTRY read_token ;
GO ;
LIST CALLS ;
The trace of running the program listed below after executing the USE file will be
displayed in the Log window.
int foo(int i, int j) {
return i+j;
}
int main(void) {
return foo(1,2);
}
The following trace in the Log window is displayed after running the sample
program, with the USE file as a source of input for Debug Tool commands:
>main
>foo
<foo
<main
If you do not want to create the USE file, you can enter the commands through the
command line, and the same effect is achieved.
Suppose the result is 0x7042A04. To set a breakpoint that watches for a change in
storage values starting at that address for the next 4 bytes, issue the command:
AT CHANGE %STORAGE(0x7042A04,4)
When the program is run, Debug Tool will halt if the value in this storage changes.
The second subparameter of STORAGE is the fill byte for storage allocated from the
heap but then freed. For example, storage freed by calling free() might be filled
with the byte 0xFB. If you see this byte repeated through storage, it is likely
storage that was allocated on the heap, but has been freed.
The third subparameter of STORAGE is the fill byte for auto storage variables in a
new stack frame. If you see this byte repeated through storage, it is likely
uninitialized auto storage.
The values chosen in the example are odd and large, to maximize early problem
detection. For example, if you attempt to branch to an odd address you will get an
exception immediately.
You will see the byte fill for uninitialized heap storage as the following example
shows:
LIST * ptr ;
(* ptr).next = 0xFDFDFDFD
(* ptr).i = -33686019
When Debug Tool stops at this breakpoint, you can bypass the CALL by entering
the GO BYPASS command. This allows you to continue your debug session without
raising a condition.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 32, “Debugging C and C++ programs,” on page 319
“Halting when certain functions are called in C++” on page 255
“Modifying the value of a C++ variable” on page 256
“Halting on a line in C++ only if a condition is true” on page 257
“Viewing and modifying data members of the this pointer in C++” on page 257
“Debugging C++ when only a few parts are compiled with TEST” on page 257
“Capturing C++ output to stdout” on page 258
“Calling a C++ function from Debug Tool” on page 259
“Displaying raw storage in C++” on page 259
“Debugging a C++ DLL” on page 259
“Getting a function traceback in C++” on page 260
“Tracing the run-time path for C++ code compiled with TEST” on page 260
“Finding unexpected storage overwrite errors in C++” on page 261
“Finding uninitialized storage errors in C++” on page 261
“Halting before calling a NULL C++ function” on page 262
This program is a simple calculator that reads its input from a character buffer. If
integers are read, they are pushed on a stack. If one of the operators (+ - * /) is
read, the top two elements are popped off the stack, the operation is performed on
them, and the result is pushed on the stack. The = operator writes out the value of
the top element of the stack to a buffer.
CALC.HPP
/*----- FILE CALC.HPP ------------------------------------------------*/
/* */
/* Header file for CALC.CPP PUSHPOP.CPP READTOKN.CPP */
/* a simple calculator */
/*--------------------------------------------------------------------*/
typedef enum toks {
T_INTEGER,
T_PLUS,
T_TIMES,
T_MINUS,
T_DIVIDE,
T_EQUALS,
T_STOP
} Token;
extern "C" Token read_token(char buf[]);
class IntLink {
private:
int i;
IntLink * next;
CALC.CPP
/*----- FILE CALC.CPP ------------------------------------------------*/
/* */
/* A simple calculator that does operations on integers that */
/* are pushed and popped on a stack */
/*--------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include "calc.hpp"
IntStack stack;
int main()
{
Token tok;
char word[100];
char buf_out[100];
int num, num2;
for(;;)
{
tok=read_token(word);
switch(tok)
{
case T_STOP:
break;
case T_INTEGER:
num = atoi(word);
stack.push(num); /* ▌CALC1▐ statement */
break;
case T_PLUS:
stack.push(stack.pop()+stack.pop());
break;
case T_MINUS:
num = stack.pop();
stack.push(num-stack.pop());
break;
case T_TIMES:
stack.push(stack.pop()*stack.pop() );
break;
case T_DIVIDE:
num2 = stack.pop();
num = stack.pop();
stack.push(num/num2); /* ▌CALC2▐ statement */
break;
case T_EQUALS:
num = stack.pop();
sprintf(buf_out,"= %d ",num);
stack.push(num);
break;
}
PUSHPOP.CPP
/*----- FILE: PUSHPOP.CPP --------------------------------------------*/
/* */
/* Push and pop functions for a stack of integers */
/*--------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include "calc.hpp"
/*--------------------------------------------------------------------*/
/* input: num - value to push on the stack */
/* action: get a link to hold the pushed value, push link on stack */
/*--------------------------------------------------------------------*/
void IntStack::push(int num) {
IntLink * ptr;
ptr = new IntLink;
ptr–>set_i(num);
ptr–>set_next(top);
top = ptr;
}
/*--------------------------------------------------------------------*/
/* return: int value popped from stack (0 if stack is empty) */
/* action: pops top element from stack and get return value from it */
/*--------------------------------------------------------------------*/
int IntStack::pop() {
IntLink * ptr;
int num;
ptr = top;
num = ptr–>get_i();
top = ptr–>get_next();
delete ptr;
return num;
}
IntStack::IntStack() {
top = 0;
}
IntStack::~IntStack() {
while(top)
pop();
}
IntLink::IntLink() { /* constructor leaves elements unassigned */
}
IntLink::~IntLink() {
}
void IntLink::set_i(int j) {
i = j;
}
int IntLink::get_i() {
return i;
}
void IntLink::set_next(IntLink * p) {
next = p;
}
IntLink * IntLink::get_next() {
return next;
}
READTOKN.CPP
/*----- FILE READTOKN.CPP --------------------------------------------*/
/* */
/* A function to read input and tokenize it for a simple calculator */
Refer to the following topics for more information related to the material discussed
in this topic.
254 Debug Tool V13.1 User's Guide
Related tasks
Chapter 25, “Debugging a C++ program in full-screen mode,” on page 251
When you use either of these commands, include the C++ signature along with the
function name.
To facilitate entering the breakpoint, you can display PUSHPOP.CPP in the Source
window by typing over the name of the file on the top line of the Source window.
This makes PUSHPOP.CPP your currently qualified program. You can then enter
the following command:
LIST NAMES
Debug Tool displays the names of all the blocks and variables for the currently
qualified program. Debug Tool displays information similar to the following
example in the Log window:
There are no session names.
The following names are known in block CALC ::> "USERID.MFISTART.CPP(PUSHPOP)"
IntStack::~IntStack()
IntStack::IntStack()
IntLink::get_i()
IntLink::get_next()
IntLink::~IntLink()
IntLink::set_i(int)
IntLink::set_next(IntLink*)
IntLink::IntLink()
Now you can save some keystrokes by inserting the command next to the block
name.
To halt just after IntStack::push(int) is called and only when num equals 16,
enter the following command:
AT ENTRY IntStack::push(int) WHEN num=16;
Run the CALC program and step into the first call of function
IntStack::push(int) until just after the IntLink has been allocated. Enter the
Debug Tool command:
LIST TITLED num
To modify the value of num to 22, type over the num = 2 line with num = 22, press
Enter to put it on the command line, and press Enter again to issue the command.
To view the attributes of variable ptr in IntStack::push(int), issue the Debug Tool
command:
DESCRIBE ATTRIBUTES *ptr;
So for most classes, structures, and unions, this can act as a browser.
You can list all the values of the data members of the class object pointed to by ptr
with the command:
LIST *ptr ;
You can change the value of data member of a class object by issuing the
assignment as a command, as in this example:
(* ptr).i = 33 ;
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Using C and C++ variables with Debug Tool” on page 320
For example, in main you want to stop in T_DIVIDE only if the divisor is 0 (before
the exception occurs). Set the breakpoint like this:
AT 40 { if(num2 != 0) GO; }
Line 40 is the statement labeled ▌CALC2▐. The command causes Debug Tool to stop
at line 40. If the value of num is not 0, the program will continue. Debug Tool stops
on line 40 only if num2 is 0.
you will see the types of the data elements pointed to by the this pointer. With the
command:
LIST *this ;
you will list the data member of the object pointed to and see something like:
LIST * this ;
(* this).i = 4
(* this).next = 0x0
or, if you have ambiguity (for example, you also have an auto variable named i),
enter:
(* this).i = 2001 ;
Debugging C++ when only a few parts are compiled with TEST
“Example: sample C++ program for debugging” on page 251
The LIST NAMES CUS command displays a list of all the compile units that are
known to Debug Tool.
or
AT ENTRY "USERID.MFISTART.CPP(PUSHPOP)":>push
GO
The only purpose of this appearance breakpoint is to gain control the first time a
function in the PUSHPOP compile unit is run. When that happens you can, for
example, set a breakpoint at entry to IntStack::push(int) as follows:
AT ENTRY IntStack::push(int) ;
With this SET command, you will not only capture stdout from your program, but
also from interactive function calls. For example, you can interactively use cout on
the command line to display a null terminated string by entering:
cout << sptr ;
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Debug Tool Reference and Messages
The calculator produces different results than before because of the additional
token removed from input.
If the string is null terminated, you can also use an interactive function call on the
command line as shown in this example:
puts(ptr) ;
You can also display storage based on offset. For example, to display 10 bytes at an
offset of 2 from location 20CD0, use the following command:
LIST STORAGE(0x20CD0,2,10);
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Displaying and modifying memory through the Memory window” on page
206
The only purpose of this appearance breakpoint is to gain control the first time a
function in the PUSHPOP compile unit is run. When this happens, you can set
breakpoints in PUSHPOP.
For example, if you run the CALC example with the following commands:
AT ENTRY read_token ;
GO ;
LIST CALLS ;
Tracing the run-time path for C++ code compiled with TEST
To trace a program showing the entry and exit of that program without requiring
any changes to it, place the following Debug Tool commands, shown in the
example below, in a file and USE them when Debug Tool initially displays your
program. Assume you have a data set that contains USERID.DTUSE(TRACE) and
contains the following Debug Tool commands:
int indent;
indent = 0;
SET INTERCEPT ON FILE stdout;
AT ENTRY * { \
++indent; \
if (indent < 0) indent = 0; \
printf("%*.s>%s\n", indent, " ", %block); \
GO; \
}
AT EXIT * {\
if (indent < 0) indent = 0; \
printf("%*.s<%s\n", indent, " ", %block); \
--indent; \
GO; \
}
You can use this file as the source of commands to Debug Tool by entering the
following command:
USE USERID.DTUSE(TRACE)
The trace of running the program listed below after executing the USE file is
displayed in the Log window:
int foo(int i, int j) {
return i+j;
}
int main(void) {
return foo(1,2);
}
The following trace in the Log window is displayed after running the sample
program, using the USE file as a source of input for Debug Tool commands:
If you do not want to create the USE file, you can enter the commands through the
command line, and the same effect will be achieved.
Suppose the result is 0x7042A04. To set a breakpoint that watches for a change in
storage values, starting at that address for the next 4 bytes, issue the command:
AT CHANGE %STORAGE(0x7042A04,4)
When the program is run, Debug Tool will halt if the value in this storage changes.
the first subparameter of STORAGE is the fill byte for storage allocated from the
heap. For example, storage allocated through operator new is filled with the byte
0xFD. If you see this byte repeated throughout storage, it is likely uninitialized
heap storage.
The second subparameter of STORAGE is the fill byte for storage allocated from the
heap but then freed. For example, storage freed by the operator delete might be
filled with the byte 0xFB. If you see this byte repeated throughout storage, it is
likely storage that was allocated on the heap, but has been freed.
The third subparameter of STORAGE is the fill byte for auto storage variables in a
new stack frame. If you see this byte repeated throughout storage, you probably
have uninitialized auto storage.
As an example of uninitialized heap storage, run program CALC, with the STORAGE
run-time option as STORAGE(FD,FB,F9), to the line labeled PUSHPOP2 and issue the
command:
LIST *ptr ;
You will see the byte fill for uninitialized heap storage as the following example
shows:
LIST * ptr ;
(* ptr).next = 0xFDFDFDFD
(* ptr).i = -33686019
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
z/OS Language Environment Programming Guide
When Debug Tool stops at this breakpoint, you can bypass the call by entering the
GO BYPASS command. This command allows you to continue your debug session
without raising a condition.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 33, “Debugging an assembler program,” on page 343
“Defining a compilation unit as assembler and loading debug data” on page
266
“Deferred LDDs” on page 267
“Halting when certain assembler routines are called” on page 269
“Displaying and modifying the value of assembler variables or storage” on
page 269
“Halting on a line in assembler only if a condition is true” on page 270
“Getting an assembler routine traceback” on page 270
“Finding unexpected storage overwrite errors in assembler” on page 271
This program is a small example of an assembler main routine (SUBXMP) that calls
an assembler subroutine (DISPARM).
SUBXMP.ASM
**************************************************************
* *
* NAME: SUBXMP *
* *
* A simple main assembler routine that brings up *
* Language Environment, calls a subroutine, and *
* returns with a return code of 0. *
* *
**************************************************************
SUBXMP CEEENTRY PPA=XMPPPA,AUTO=WORKSIZE
USING WORKAREA,R13
* Invoke CEEMOUT to issue the greeting message
CALL CEEMOUT,(HELLOMSG,DEST,FBCODE),VL,MF=(E,CALLMOUT)
* No plist to DISPARM, so zero R1. Then call it.
SLR R0,R0
* CONSTANTS
HELLOMSG DC Y(HELLOEND-HELLOSTR)
HELLOSTR DC C’Hello from the sub example.’
HELLOEND EQU *
BYEMSG DC Y(BYEEND-BYESTART)
BYESTART DC C’Terminating the sub example.’
BYEEND EQU *
DEST DC F’2’ Destination is the LE message file
COUNTER DC F’-1’
DISPARM.ASM
**************************************************************
* *
* NAME: DISPARM *
* *
* Shows an assembler subroutine that displays inbound *
* parameters and returns. *
* *
**************************************************************
DISPARM CEEENTRY PPA=PARMPPA,AUTO=WORKSIZE,MAIN=NO
USING WORKAREA,R13
* Invoke CEE3PRM to retrieve the command parameters for us
SLR R0,R0
ST R0,COUNTER
CALL CEE3PRM,(CHARPARM,FBCODE),VL,MF=(E,CALL3PRM) ▌CALL2▐
* Check the feedback code from CEE3PRM to see if everything worked.
CLC FBCODE(8),CEE000
BE GOT_PARM
* Invoke CEEMOUT to issue the error message for us
CALL CEEMOUT,(BADFBC,DEST,FBCODE),VL,MF=(E,CALLMOUT)
B GO_HOME Time to go....
GOT_PARM DS 0H
* See if the parm string is blank.
LA R1,1
SAVECTR ST R1,COUNTER
CL R1,=F’5’ ▌BUMPCTR▐
BH LOOPEND
LA R1,1(,R1)
B SAVECTR
LOOPEND DS 0H
DISPLAY_PARM DS 0H
* Set up the plist to CEEMOUT to display the parm.
LA R0,2
ST R0,COUNTER
LA R02,80 Get the size of the string
STH R02,BUFFSIZE Save it for the len-prefixed string
* Invoke CEEMOUT to display the parm string for us
CALL CEEMOUT,(BUFFSIZE,DEST,FBCODE),VL,MF=(E,CALLMOUT)
* AMODE Testing
GO_TEST DS 0H
L R15,INAMODE24@
BSM R14,R15
InAMode24 Equ *
LA R1,DEST
O R1,=X’FF000000’
L R15,0(,R1)
LA R15,2(,R15)
ST R15,0(,R1)
L R15,INAMODE31@
BSM R14,R15
InAMode31 Equ *
* Return to the caller
GO_HOME DS 0H
LA R0,3
ST R0,COUNTER
CEETERM RC=0
* CONSTANTS
DEST DC F’2’ Destination is the LE message file
CEE000 DS 3F’0’ Success feedback code
InAMode24@ DC A(InAMode24)
InAMode31@ DC A(InAMode31+X’80000000’)
BADFBC DC Y(BADFBEND-BADFBSTR)
BADFBSTR DC C’Feedback code from CEE3PRM was nonzero.’
BADFBEND EQU *
NOPARM DC Y(NOPRMEND-NOPRMSTR)
NOPRMSTR DC C’No user parm was passed to the application.’
NOPRMEND EQU *
PARMPPA CEEPPA , Constants describing the code block
* ===================================================================
WORKAREA DSECT
ORG *+CEEDSASZ Leave space for the DSA fixed part
CALL3PRM CALL ,(,),VL,MF=L 2-argument parameter list
CALLMOUT CALL ,(,,),VL,MF=L 3-argument parameter list
FBCODE DS 3F Space for a 12-byte feedback code
COUNTER DS F
BUFFSIZE DS H Halfword prefix for following string
CHARPARM DS CL255 80-byte buffer
DS 0D
WORKSIZE EQU *-WORKAREA
PRINT NOGEN
CEEDSA , Mapping of the dynamic save area
CEECAA , Mapping of the common anchor area
MYDATA DSECT ,
MYF DS F
R0 EQU 0
R1 EQU 1
R2 EQU 2
R3 EQU 3
R4 EQU 4
R5 EQU 5
When the CU name specified on the LDD command is not currently known to
Debug Tool, a message is issued and the LDD command is deferred until a CU by
that name becomes known (appears). At that time, the CU is automatically created
as an assembler CU and an attempt is made to load the debug data using the
default data set name or the current SET DEFAULT LISTINGS specification.
After you have entered an LDD command for a CU, you cannot view the CU as a
disassembly CU.
If Debug Tool cannot find the associated assembler debug data after you have
entered an LDD command, the CU is an assembler CU rather than a disassembly
CU. You cannot enter another LDD command for this CU. However, you can enter a
SET DEFAULT LISTING command or a SET SOURCE command to cause the associated
debug data to be loaded from a different data set.
If the debug data cannot be found in this way, you must using the SET SOURCE
or SET DEFAULT LISTINGS command after the CU appears to cause the debug
data to be loaded from the correct data set. You can do this using a command such
as:
AT APPEARANCE mycu SET SOURCE (mycu) hlq.qual1.dsn
Alternatively, you might wait until you have stopped for some other reason after
"mycu" has appeared and then use the SET SOURCE or SET DEFAULT LISTING
commands to direct Debug Tool to the proper data set.
Re-appearance of an assembler CU
If a CU from which valid assembler debug data has been loaded goes away and
then reappears (e.g., the load module is deleted and then reloaded), the CU is
immediately marked as an assembler CU and the debug data is reloaded from the
data set from which it was successfully loaded originally.
You do not need to (and cannot) issue another LDD for that CU because it is
already known as an assembler CU and the debug data has already been loaded.
In most cases, all of the CSECTs in the assembly will be present in the load module
or program object. However, in some cases, one or more of the assemblies might
not be present or might be replaced by other CSECTs of the same name. There are,
therefore, two ways of loading the debug data for assemblies containing multiple
CSECTs:
v When SET LDD ALL is in effect, the debug data for all CSECTs (CUs) in the
assembly is loaded as the result of a single LOADDEBUGDATA (LDD)
command.
v When SET LDD SINGLE is in effect, a separate LDD command must be issued
for each CSECT (CU). This form must be used when one or more of the CSECTs
in the assembly are not present in the load module or program object or when
one or more of the CSECTs have been replaced by other CSECTs of the same
name.
The following sections use an example assembly that generates two CSECTs:
MYPROG and MYPROGA. The debug information for both of these CSECTs is in
the data set yourid.EQALANGX(MYPROG).
When you enter the command LDD MYPROG, Debug Tool finds and loads the
debug data for both MYPROG and MYPROGA. After the debug data is loaded,
Debug Tool uses the debug data to create two CUs, one for MYPROG and another
for MYPROGA.
When you enter the command LDD MYPROG, Debug Tool finds and loads the debug
information for both MYPROG and MYPROGA. However, because you specified
only MYPROG on the LDD command and SET LDD SINGLE is in effect, Debug
Tool uses only the debug information for MYPROG. Then, if you enter the
command LDD MYPROGA, Debug Tool does the following steps:
1. If you entered a SET SOURCE command before entering the LDD MYPROG
command, Debug Tool loads the debug data from the data set that you
specified with the SET SOURCE command.
2. If you did not enter the SET SOURCE command or if Debug Tool did not find
debug information in step 1, Debug Tool searches through all previously loaded
debug information. If Debug Tool finds a name and CSECT length that matches
the name and CSECT length of MYPROGA, Debug Tool uses this debug
information.
When you look at the source listing, all lines contained in a CSECT to which you
are not currently qualified have an asterisk immediately before the offset field and
following the statement number. If you want to set a line or statement breakpoint
on a statement that has this asterisk, you must first qualify to the containing
compile unit by using the following command:
SET QUALIFY CU compile_unit_name;
After you enter this command, the asterisks are removed from the line on which
you wanted to set a breakpoint. The absence of the asterisk indicates that you can
set a line or statement breakpoint on that line.
You cannot use the SET QUALIFY command to qualify to an assembler compile unit
until after you have loaded the debug data for that compile unit.
To halt after the DISPARM routine is called, enter the following command:
AT ENTRY DISPARM
To halt after the DISPARM routine is called and only when R1 equals 0, enter the
following command:
AT ENTRY DISPARM WHEN R1=0;
The AT CALL command is not supported for assembler routines. Do not use the AT
CALL command to stop Debug Tool when an assembler routine is called.
The Debug Tool Log window displays something similar to the following example:
QUERY LOCATION
You are executing commands in the ENTRY XMPLOAD ::> DISPARM breakpoint.
The program is currently entering block XMPLOAD ::> DISPARM.
For example, run the SUBXMP program to the statement labeled ▌CALL1▐ by
entering AT 70 ; GO ; on the Debug Tool command line. Scroll up until you see
line 67. Move the cursor over COUNTER and press PF4 (LIST). The following
appears in the Log window:
LIST ( COUNTER )
COUNTER = 0
To modify the value of COUNTER to 1, type over the COUNTER = 0 line with
COUNTER = 1, press Enter to put it on the command line, and press Enter again
to issue the command.
To list the contents of the 16 bytes of storage 2 bytes past the address contained in
register R0, type the command LIST STORAGE(R0->+2,16) on the command line and
press Enter. The contents of the specified storage are displayed in the Log window.
LIST STORAGE( R0 -> + 2 , 16 )
000C321E C8859393 96408699 969440A3 888540A2 *Hello from the s*
To modify the first two bytes of this storage to X'C182', type the command R0->+2
<2> = X'C182'; on the command line and press Enter to issue the command.
After you enter the command, Debug Tool displays the following result:
PROG1+X’12C’
The result indicates that the address X'1BC5C' corresponds to offset X'12C' within
CSECT PROG1.
In the DISPARM program, to stop Debug Tool when the COUNTER variable is set to
3, enter the following command:
AT 78 DO; IF COUNTER ^= 3 THEN GO; END;
Line 78 is the line labeled ▌BUMPCTR▐. The command causes Debug Tool to stop at
line 78. If the value of COUNTER is not 3, the program continues. The command
causes Debug Tool to stop on line 78 only if the value of COUNTER is 3.
For example, if you run the SUBXMP example with the following commands, the
Log window displays the traceback of callers:
To find the address of the operand being loaded, enter the following command:
LIST R3->+X’24’
Suppose the result is X'00521D42'. To set a breakpoint that watches for a change in
storage values starting at that address and for the next 4 bytes, enter the following
command:
AT CHANGE %STORAGE(X’00521D42’,4)
When the program runs, Debug Tool stops if the value in this storage changes.
The window acted upon as you customize your session is determined by one of
several factors. If you specify a window name (for example, WINDOW OPEN MONITOR
to open the Monitor window), that window is acted upon. If the command is
cursor-oriented, such as the WINDOW SIZE command, the window containing the
cursor is acted upon. If you do not specify a window name and the cursor is not
in any of the windows, the window acted upon is determined by the setting of
Default window under the Profile Settings panel.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 20, “Using full-screen mode: overview,” on page 157
Chapter 27, “Customizing your full-screen session”
“Defining PF keys”
“Defining a symbol for commands or other strings”
“Customizing the layout of physical windows on the session panel” on page
274
“Customizing session panel colors” on page 276
“Customizing profile settings” on page 277
“Saving customized settings in a preferences file” on page 279
Defining PF keys
To define your PF keys, use the SET PFKEY command. For example, to define the
PF8 key as SCROLL DOWN PAGE, enter the following command:
SET PF8 "Down" = SCROLL DOWN PAGE ;
Use quotation marks (") for C and C++. You can use either apostrophes (') or
quotation marks (") for assembler, COBOL, LangX COBOL, disassembly, and PL/I.
The string set apart by the quotation marks or apostrophes (Down in this example)
is the label that appears next to PF8 when you SET KEYS ON and your PF key
definitions are displayed at the bottom of your screen.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
“Initial PF key settings” on page 173
The PANEL LAYOUT command displays the panel below, showing the six possible
physical window layouts.
Window Layout Selection Panel
Command ===>
Initially, the session panel uses the default window layout ▌1▐.
Follow the instructions on the screen, then press the END PF key to save your
changes and return to the main session panel in the new layout.
Note: You can choose only one of the six layouts. Also, only one of each type of
window can be visible at a time on your session panel. For example, you cannot
have two Log windows on a panel.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Opening and closing physical windows” on page 275
When you close a physical window, the remaining windows occupy the full area of
the screen.
If you want to monitor the values of selected variables as they change during your
Debug Tool session, you must display the Monitor window in a physical window.
If it is not being displayed in a physical window, open a physical window as
described above. The Monitor window occupies the available space according to
your selected physical window layout.
If you open a physical window and the contents assigned to it are not available,
the physical window is empty.
For the Memory window and the Monitor window, if you make a physical
window too narrow to properly display the contents of that window, Debug Tool
To restore physical window sizes to their default values for the current physical
window layout, enter the PANEL LAYOUT RESET command.
PF11 (ZOOM LOG) toggles the Log window in the same way, without the cursor
needing to be in the Log window.
To change the color, intensity, or highlighting of various fields of the session panel
on a color terminal, use the PANEL COLORS command. When you issue this
command, the panel shown below appears.
Color Selection Panel
Command ===>
Color Highlight Intensity
Title : field headers TURQ NONE HIGH
output fields GREEN NONE LOW Valid Color:
Monitor: contents TURQ REVERSE LOW White Yellow Blue
line numbers TURQ REVERSE LOW Turq Green Pink Red
Source : listing area WHITE REVERSE LOW
prefix area TURQ REVERSE LOW Valid Intensity:
suffix area YELLOW REVERSE LOW High Low
current line RED REVERSE HIGH
breakpoints GREEN NONE LOW Valid Highlight:
Log : program output TURQ NONE HIGH None Reverse
test input YELLOW NONE LOW Underline Blink
test output GREEN NONE HIGH
line numbers BLUE REVERSE HIGH Color and Highlight
Memory : information GREEN NONE LOW are valid only with
offset column WHITE NONE LOW color terminals.
address column YELLOW NONE LOW
hex data GREEN NONE LOW
character data BLUE NONE LOW
Command line WHITE NONE HIGH
Window headers GREEN REVERSE HIGH
Tofeof delimiter BLUE REVERSE HIGH
Search target RED NONE HIGH
Enter END/QUIT to return with current settings saved.
CANCEL to return without current settings saved.
Initially, the session panel areas and fields have the default color and attribute
values shown above.
The usable color attributes are determined by the type of terminal you are using. If
you have a monochrome terminal, you can still use highlighting and intensity
attributes to distinguish fields.
You can also change the colors or intensity of selected areas by issuing the
equivalent SET COLOR command from the command line. Either specify the fields
explicitly, or use the cursor to indicate what you want to change. Changing a color
or highlight with the equivalent SET command changes the value on the Color
Selection Panel.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Saving customized settings in a preferences file” on page 279
Current Setting
---------------
Change Test Granularity STATEMENT (All,Blk,Line,Path,Stmt)
DBCS characters NO (Yes or No)
Default Listing PDS name
Default scroll amount PAGE (Page,Half,Max,Csr,Data,int)
Default window SOURCE (Log,Monitor,Source, Memory)
Execute commands YES (Yes or No)
History YES (Yes or No)
History size 100 (nonnegative integer)
Logging YES (Yes or No)
Pace of visual trace 2 (steps per second)
Refresh screen NO (Yes or No)
Rewrite interval 50 (number of output lines)
Session log size 1000 (number of retained lines)
Show log line numbers YES (Yes or No)
Show message ID numbers NO (Yes or No)
Show monitor line numbers YES (Yes or No)
Show scroll field YES (Yes or No)
Show source/listing suffix YES (Yes or No)
Show warning messages YES (Yes or No)
Test level ALL (All,Error,None)
Enter END/QUIT to return with current settings saved.
CANCEL to return without current settings saved.
You can change the settings either by typing your desired values over them, or by
issuing the appropriate SET command at the command line or from within a
commands file.
The profile parameters, their descriptions, and the equivalent SET commands are as
follows:
Change Test Granularity
Specifies the granularity of testing for AT CHANGE. Equivalent to SET CHANGE.
A field indicating scrolling values is shown only if the screen is not large enough
to show all the profile parameters at once. This field is not shown in the example
panel above.
You can change the settings of these profile parameters at any time during your
session. For example, you can increase the delay that occurs between the execution
of each statement when you issue the STEP command by modifying the amount
specified in the Pace of visual trace field at any time during your session.
To modify the profile settings for your session, enter a new value over the old
value in the field you want to change. Equivalent SET commands are issued when
you QUIT from the panel.
Entering the equivalent SET command changes the value on the Profile Settings
panel as well.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Saving customized settings in a preferences file”
For input typed directly at the terminal, input is free-form, optionally starting in
column 1.
For input that comes from a commands file or USE file, all of the Debug Tool
commands must be terminated with a semicolon, except for the C block command.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Entering commands on the session panel” on page 167
“Abbreviating Debug Tool keywords” on page 284
“Entering multiline commands in full-screen” on page 285
“Entering multiline commands in a commands file” on page 285
“Entering multiline commands without continuation” on page 286
“Using blanks in Debug Tool commands” on page 286
“Entering comments in Debug Tool commands” on page 287
“Using constants in Debug Tool commands” on page 287
“Getting online help for Debug Tool command syntax” on page 288
Related references
Debug Tool Reference and Messages
DBCS
When the DBCS setting is ON, you can specify DBCS characters in the following
portions of all the Debug Tool commands:
v Commentary text
v Character data valid in the current programming language
v Symbolic identifiers such as variable names (for COBOL, this includes session
variables), entry names, block names, and so forth (if the names contain DBCS
characters in the application program).
When the DBCS setting is OFF, double-byte data is not correctly interpreted or
displayed. However, if you use the shift-in and shift-out codes as data instead of
DBCS indicators, you should issue SET DBCS OFF.
The system keywords, and COMMENT, INPUT, and USE keywords, take precedence
over other keywords and identifiers. If one of these keywords is followed by a
blank, it is always parsed as the corresponding command. Hence, if you want to
assign the value 2 to a variable named TSO and the current programming
language setting is C, the "=" must be abutted to the reference, as in "TSO<no
space>= 2;" not "TSO<space>= 2;". If you want to define a procedure named USE,
you must enter "USE<no space>: procedure;" not "USE<space>:: procedure;".
When you truncate, you need only enter enough characters of the command to
distinguish the command from all other valid Debug Tool commands. You should
not use truncations in a commands file or compile them into programs because
they might become ambiguous in a subsequent release. The following shows
examples of Debug Tool command truncations:
If you specify a truncation that is also a variable in your program, the keyword is
chosen if this is the only ambiguity. For example, LIST A does not display the
value of variable A, but executes the LIST AT command, listing your current AT
breakpoints. To display the value of A, issue LIST (A).
When you enter a command in interactive mode, the continuation character must
be the last non-blank character in the command line. In the following example, the
continuation character is the single-byte character set (SBCS) hyphen (-):
LIST (" this is a very very very vvvvvvvvvvvvvvvvvvvvvvvvvvvvv –
very long string");
If you want to end a line with a character that Debug Tool might interpret as a
continuation character, follow that character with another valid non-blank
character. For example, in C and C++, if you want to enter “i––”, you could enter
“(i––)” or “i––;”. When the current programming language setting is C and C++,
you can use the backslash character (\).
Refer to the following topics for more information related to the material discussed
in this topic.
BEGIN command in Debug Tool Reference and Messages
DO command (PL/I) in Debug Tool Reference and Messages
For C++ only: Comments in the form "//" are not processed by Debug Tool in
C++.
v For all supported programming languages, comments can be entered by:
– Enclosing the text in comment brackets "/*" and "*/". Comments can occur
anywhere a blank can occur between keywords, identifiers, and numeric
constants. Comments entered in this manner do not appear in the session log.
– Using the COMMENT command to insert commentary text in the session log.
Comments entered in this manner cannot contain embedded semicolons.
v When the current programming language setting is COBOL, comments can also
be entered by using an asterisk (*) in column 7. This is valid for file input only.
v For assembler and disassembly, comments can also be entered by using an
asterisk (*) in column 1.
Comments are most helpful in file input. For example, you can insert comments in
a USE file to explain and describe the actions of the commands.
Debug Tool allows the use of hexadecimal addresses in COBOL and PL/I.
The COBOL H constant is a fullword address value that can be specified in hex
using numeric-hex-literal format (hexadecimal characters only, delimited by either
quotation marks (") or apostrophes (') and preceded by H). The value is
right-justified and padded on the left with zeros.
Note: The H constant can only be used where an address or POINTER variable can
be used. You can use this type of constant with the SET command. For example, to
assign a hexadecimal value of 124BF to the variable ptr, specify:
SET ptr TO H"124BF";
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
The Debug Tool SYSTEM and TSO commands followed by ? do not invoke the syntax
help; instead the ? is sent to the host as part of the system command. The COMMENT
command followed by ? also does not invoke the syntax help.
The table below shows the interpretive subset of COBOL statements recognized by
Debug Tool.
Command Description
CALL Subroutine call
COMPUTE Computational assignment (including expressions)
Declarations Declaration of session variables
EVALUATE Multiway switch
IF Conditional execution
MOVE Noncomputational assignment
PERFORM Iterative looping
SET INDEX and POINTER assignment
This subset of commands is valid only when the current programming language is
COBOL.
Related references
Debug Tool Reference and Messages
The continuation line (with a hyphen in column 7) optionally has one or more
blanks following the hyphen, followed by the continuing characters. In the case of
the continuation of a literal string, an additional quotation mark is required. When
the token being continued is not a literal string, blanks following the last nonblank
character on the previous line are ignored, as are blanks following the hyphen.
When Debug Tool copies commands to the log file, they are formatted according to
the rules above so that you can use the log file during subsequent Debug Tool
sessions.
Continuation is not allowed within a DBCS name or literal string. This restriction
applies to both interactive and commands file input.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
“COBOL compiler options in effect for Debug Tool commands”
“COBOL reserved keywords”
Enterprise COBOL for z/OS Language Reference
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Enterprise COBOL for z/OS Language Reference
In addition to being allowed to assign values to variables and display the values of
variables during your session, you can declare session variables to suit your testing
needs.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Accessing COBOL variables”
“Assigning values to COBOL variables”
“Displaying values of COBOL variables” on page 292“Declaring session
variables in COBOL” on page 295
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Choosing TEST or NOTEST compiler suboptions for COBOL programs” on
page 27
You can also use table elements in such assignments as shown in the following
example:
COMPUTE itm-2(1,2)=(a + 1)/e(2);
The value assigned to a variable is always assigned to the storage for that variable.
In an optimized program, a variable might be temporarily assigned to a register,
and a new value assigned to that variable might not alter the value used by the
program.
Assign to the program variable c , found in structure d , the value of the program
variable a , found in structure b:
MOVE a OF b TO c OF d;
You can also use reference modification to assign values to variables as shown in
the following two examples:
MOVE aa(2:3)TO bb;
MOVE aa TO bb(1:4);
Put commas between the variables when listing more than one. If you do not want
to display the variable names when issuing the LIST command, issue LIST
UNTITLED instead of LIST TITLED.
The value displayed for a variable is always the value that was saved in storage
for that variable. In an optimized program, a variable can be temporarily assigned
to a register, and the value shown for that variable might differ from the value
being used by the program.
If you use the LIST command to display a National variable, Debug Tool converts
the Unicode data to EBCDIC before displaying it. If the conversion results in
characters that cannot be displayed, enter the LIST %HEX() command to display the
unconverted Unicode data in hexadecimal format.
If you are debugging in full-screen mode and your terminal is not DBCS capable,
the SET DBCS ON is not available.
The DBCS syntax and continuation rules you must follow to use DBCS variables in
Debug Tool commands are the same as those for the COBOL language.
For COBOL you must type a DBCS literal, such as G, in front of a DBCS value in a
Monitor or Data pop-up window if you want to update the value.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Enterprise COBOL for z/OS Language Reference
Note: Values in the range 3–16 can be assigned to %PATHCODE only if your program
was compiled with an option supporting path hooks.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Choosing TEST or NOTEST compiler suboptions for COBOL programs” on
page 27
The following declarations are for a string variable, a decimal variable, a pointer
variable, and a floating-point variable. To declare a string named description,
enter:
77 description PIC X(25)
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Using session variables across different programming languages” on page 412
Related references
Enterprise COBOL for z/OS Language Reference
Only simple relation conditions are supported. Sign conditions, class conditions,
condition-name conditions, switch-status conditions, complex conditions, and
abbreviated conditions are not supported. When either of the comparands in a
relation condition is stated in the form of an arithmetic expression (using operators
such as plus and minus), the restriction concerning floating-point operands applies
to both comparands. See Debug Tool Reference and Messages for a table that describes
the allowable comparisons for the IF command. See the Enterprise COBOL for z/OS
Programming Guide for a description of the COBOL rules of comparison.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Displaying the results of COBOL expression evaluation”
“Using constants in COBOL expressions”
Enterprise COBOL for z/OS Programming Guide
Related references
Debug Tool Reference and Messages
You can also use structure elements in expressions. If e is an array, the following
two examples are valid:
LIST a + e(1) / c * two;
LIST xx / e(two + 3);
Conditions for expression evaluation are the same ones that exist for program
statements.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
“COBOL compiler options in effect for Debug Tool commands” on page 290
Enterprise COBOL for z/OS Language Reference
Additionally, Debug Tool allows the use of a hexadecimal constant that represents
an address. This H-constant is a fullword value that can be specified in hex using
numeric-hex-literal format (hexadecimal characters only, delimited by either
quotation marks (") or apostrophes (') and preceded by H). The value is
right-justified and padded on the left with zeros. The following example:
LIST STORAGE (H’20cd0’);
You can use qualification to specify to what compile unit or block a particular
variable belongs. When Debug Tool is invoked, there is a default qualification
established for the currently executing block; it is implicitly qualified. Thus, you
must explicitly qualify your references to all statement numbers and variable
names in any other block. It is necessary to do this when you are testing a compile
unit that calls one or more blocks or compile units. You might need to specify
what block contains a particular statement number or variable name when issuing
commands.
If required, load_name is the name of the load module. It is required only when the
program consists of multiple load modules and you want to change the
qualification to other than the current load module. load_name can also be the
Debug Tool variable %LOAD.
If required, cu_name is the name of the compile unit. The cu_name must be the fully
qualified compile unit name. It is required only when you want to change the
qualification to other than the currently qualified compile unit. It can be the Debug
Tool variable %CU.
If required, block_name is the name of the block. The block_name is required only
when you want to change the qualification to other than the currently qualified
block. It can be the Debug Tool variable %BLOCK. If block_name is case sensitive,
enclose the block name in quotation marks (") or apostrophes ('). If the name is not
inside quotation marks or apostrophes, Debug Tool converts the name to upper
case.
You can distinguish between the main and subprog blocks using qualification. If
you enter the following MOVE commands when main is the currently executing
block:
MOVE 8 TO var4;
MOVE 9 TO subprog:>var4;
MOVE ’A’ TO var3 OF var2 OF var1;
MOVE ’B’ TO subprog:>var3 OF var2 OF var1;
and the following LIST commands when subprog is the currently executing block:
LIST TITLED var4;
LIST TITLED main:>var4;
LIST TITLED var3 OF var2 OF var1;
LIST TITLED main:>var3 OF var2 OF var1;
You can then issue commands using the variables declared in subprog without
using qualifiers. Debug Tool does not see the variables declared in procedure main.
For example, the following assignment commands are valid with the subprog point
of view:
MOVE 10 TO var5;
However, if you want to display the value of a variable in main while the point of
view is still in subprog, you must use a qualifier, as shown in the following
example:
LIST (main:>var-name);
The above method of changing the point of view is necessary for command files.
A fully qualified block name for a method in the OBJECT paragraph is:
class-name:>OBJECT:>method-name
When you are at a breakpoint in a method, the currently qualified block is the
method. If you enter the LIST TITLED command with no parameters, Debug Tool
lists all of the data items associated with the method. To list all of the data items in
a FACTORY or OBJECT, do the following steps:
1. Enter the QUALIFY command to set the point of view to the FACTORY or
OBJECT.
2. Enter the LIST TITLED command.
For example, to list all of the object instance data items for a class called
ACCOUNT, enter the following command:
QUALIFY BLOCK ACCOUNT:>OBJECT; LIST TITLED;
Debug Tool does not get control of the program at breakpoints that you set by the
following commands:
v AT PATH
v AT CALL
v AT ENTRY
v AT EXIT
v AT LABEL
However, if you set the breakpoint with an AT CALL command that calls a non-VS
COBOL II program, Debug Tool does get control of the program. Use the AT ENTRY
*, AT EXIT *, AT GLOBAL ENTRY, and AT GLOBAL EXIT commands to set breakpoints
that Debug Tool can use to get control of the program.
Breakpoints that you set at entry points and exit statements have no statement
associated with them. Therefore, they are triggered only at the compile unit level.
When they are triggered, the current view of the listing moves to the top and no
statement is highlighted. Breakpoints that you set at entry points and exit
statements are ignored by the STEP command.
If you are debugging your VS COBOL II program in remote debug mode, use the
same TEST run-time options as for any COBOL program.
For additional information about how you can debug VS COBOL II programs, see
Using CODE/370 with VS COBOL II and OS PL/I, SC09-1862.
As you read through the information in this document, remember that OS/VS
COBOL programs are non-Language Environment programs, even though you
might have used Language Environment libraries to link and run your program.
Debug Tool locates the debug information in a data set with the following name:
yourid.EQALANGX(mypgm). If Debug Tool finds this data set, you can begin to debug
your LangX COBOL program. If Debug Tool does not find the data set, enter the
SET SOURCE or SET DEFAULT LISTINGS command to indicate to Debug Tool where to
find the debug information.
Normally, compile units without debug information are not listed when you enter
the DESCRIBE CUS or LIST NAMES CUS commands. To include these compile units,
enter the SET ASSEMBLER ON command. The next time you enter the DESCRIBE CUS
or LIST NAMES CUS command, these compile units are listed.
The information displayed in the Source window is similar to the listing generated
by the COBOL compiler. The Source window displays the following information:
▌1▐ LX COBOL
This indicates that the current source program is LangX COBOL.
▌2▐ line number
The line number is a number assigned by the EQALANGX program by
sequentially numbering the source lines. Use the numbers in this column
to set breakpoints and identify statements.
▌3▐ source statement
The original source statement.
Refer to the following topics for more information related to the material discussed
in this topic.
Related concepts
“Debug Tool evaluation of PL/I expressions” on page 313
Related tasks
Chapter 23, “Debugging a PL/I program in full-screen mode,” on page 231
Chapter 31, “Debugging PL/I programs”
“Accessing PL/I program variables” on page 311
Related references
“Debug Tool subset of PL/I commands”
“Supported PL/I built-in functions” on page 314
Command Description
Assignment Scalar and vector assignment
BEGIN Composite command grouping
CALL Debug Tool procedure call
DECLARE or DCL Declaration of session variables
DO Iterative looping and composite command grouping
IF Conditional execution
ON Define an exception handler
SELECT Conditional execution
The following types of Debug Tool commands will support the syntax of the PL/I
statements:
Expression
This command evaluates an expression.
Block BEGIN/END, DO/END, PROCEDURE/END
These commands provide a means of grouping any number of Debug Tool
commands into "one" command.
The table below shows the commands that are new or changed for this release of
Debug Tool when the current programming language is PL/I.
Note: For Enterprise PL/I programs, the following condition is not supported:
v AT OCCURRENCE CONDITION conditions (name)
These PL/I language-oriented commands are only a subset of all the commands
that are supported by Debug Tool.
This will result in different behavior depending upon the language. For example,
the following will find a<kk>b in C and <.Akk.b> in PL/I.
LIST NAMES a<kk>*
Freeform will be added to the parser and will be in effect while the current
programming language is PL/I.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Using session variables across different programming languages” on page 412
Debug Tool uses the symbol table to obtain information about program variables,
controlled variables, automatic variables, and program control constants such as
file and entry constants and also CONDITION condition names. Based variables,
controlled variables, automatic variables and parameters can be used with Debug
Tool only after storage has been allocated for them in the program. An exception to
this is DESCRIBE ATTRIBUTES, which can be used to display attributes of a variable.
Variables that are based on any of the following data types must be explicitly
qualified when used in expressions:
v an OFFSET variable
v an expression
v a pointer that is either BASED or DEFINED
v a parameter
v a member of either an array or a structure
v an address of a member of either an array or a structure
You would not be able to reference the variable directly by name. You can only
reference it by specifying either:
P2->DX
or
P1->P2->DX
The following types of program variables cannot be used with Debug Tool:
v iSUB defined variables
v Variables defined:
– On a controlled variable
– On an array with one or more adjustable bounds
– With a POSITION attributed that specifies something other than a constant
v Variables that are members of a based structure declared with the REFER options.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Choosing TEST or NOTEST compiler suboptions for PL/I programs” on page
33
To display the 10th element in the array, enter the following command:
LIST PAYROLL(10);
To display the first and last name of the 31st element in the array, enter the
following command:
LIST PAYROLL.NAME(31);
To display all the elements of the array by the order of each element in the
structure, enter the following command:
LIST PAYROLL;
Debug Tool displays results similar to the following list, with ellipses (...) used to
indicate that additional information has been removed from this list to condense
the list:
LIST PAYROLL;
PAYROLL.NAME.LAST(1)=’Smith ’
PAYROLL.NAME.LAST(2)=’Ramirez ’
PAYROLL.NAME.LAST(3)=’Patel ’
...
PAYROLL.NAME.LAST(100)=’Li ’
PAYROLL.NAME.FIRST(1)=’Jason ’
PAYROLL.NAME.FIRST(2)=’Ricardo ’
PAYROLL.NAME.FIRST(3)=’Aisha ’
...
PAYROLL.NAME.FIRST(100)=’Xian ’
PAYROLL.HOURS.REGULAR(1)=’40’
PAYROLL.HOURS.REGULAR(2)=’40’
PAYROLL.HOURS.REGULAR(3)=’40’
...
PAYROLL.HOURS.REGULAR(100)=’40’
PAYROLL.HOURS.OVERTIME(1)=’0’
PAYROLL.HOURS.OVERTIME(2)=’2’
PAYROLL.HOURS.OVERTIME(3)=’3’
...
PAYROLL.HOURS.OVERTIME(100)=’0’
To display all the elements of the array by the order in which the information is
stored in memory, enter the following commands:
SET LIST BY SUBSCRIPT ON;
LIST PAYROLL;
The Debug Tool expression is similar to the PL/I expression. If the source of the
command is a variable-length record source (such as your terminal) and if the
expression extends across more than one line, a continuation character (an SBCS
hyphen) must be specified at the end of all but the last line.
Debug Tool cannot evaluate PL/I expressions until you step past the ENTRY
location of the PL/I program.
All PL/I constant types are supported, plus the Debug Tool PX constant.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
“Unsupported PL/I language elements” on page 316
Note:
1. Abbreviation for BINARYVALUE
2. Abbreviation for CURRENTSTORAGE
3. Abbreviation for POINTERADD
4. Abbreviation for POINTERVALUE
Debug Tool supports the following built-in functions for Enterprise PL/I:
Note:
1. To use the built-in functions COPY, DATE, DATETIME, ENTRYADDR, HIGH,
LOW, LOWERCASE, REPEAT, SUBSTR, TIME, TRANSLATE, UNSPEC, and
UPPERCASE, you must apply the Language Environment runtime PTF for
APAR PQ94347 if you are running on z/OS Version 1 Release 6.
2. Pseudovariables are not supported for the ENTRYADDR built-in function under
Debug Tool.
3. To use the ALLOCATION built-in function, you must apply the Language
Environment runtime PTF for APAR PK16316 if you are running on z/OS
Version 1 Release 6 or Version 1 Release 7.
Debug Tool does not support the following built-in functions for Enterprise PL/I:
ABS EMPTY
ALL GRAPHIC
ANY IMAG
BIT MPSTR
BOOL REAL
CHAR STATUS
COMPLETION STORAGE
CSTG(2) STRING
CURRENTSTORAGE
DEFINE STRUCTURE
These checks are restrictions that can be removed by issuing SET WARNING OFF.
The OS PL/I compiler does not place the name of the listing data set in the object
(load module). Debug Tool tries to find the listing data set in the following
location: userid.CUName.LIST. If the listing is in a PDS, direct Debug Tool to the
location of the PDS in one of the following ways:
v In full-screen mode, enter the following command:
SET DEFAULT LISTINGS my.listing.pds
v Use the EQADEBUG DD statement to define the location of the data set.
v Code the EQAUEDAT user exit with the location of the data set.
Refer to the following topics for more information related to the material discussed
in this topic.
Related concepts
“C and C++ expressions” on page 323
“Debug Tool evaluation of C and C++ expressions” on page 327
“Scope of objects in C and C++” on page 330
“Blocks and block identifiers for C” on page 332
“Blocks and block identifiers for C++” on page 332
“Monitoring storage in C++” on page 340
Related tasks
Chapter 24, “Debugging a C program in full-screen mode,” on page 241
Chapter 25, “Debugging a C++ program in full-screen mode,” on page 251
“Using C and C++ variables with Debug Tool” on page 320
“Declaring session variables with C and C++” on page 322
“Calling C and C++ functions from Debug Tool” on page 324
“Intercepting files when debugging C and C++ programs” on page 328
“Displaying environmental information for C and C++ programs” on page 334
“Stepping through C++ programs” on page 338
“Setting breakpoints in C++” on page 338
“Examining C++ objects” on page 339
“Qualifying variables in C and C++” on page 335
Related references
“Debug Tool commands that resemble C and C++ commands”
“%PATHCODE values for C and C++” on page 322
“C reserved keywords” on page 325
“C operators and operands” on page 326
“Language Environment conditions and their C and C++ equivalents” on page
326
The table below shows the interpretive subset of C and C++ commands recognized
by Debug Tool.
Command Description
block ({}) Composite command grouping
break Termination of loops or switch commands
declarations Declaration of session variables
do/while Iterative looping
This subset of commands is valid only when the current programming language is
C or C++.
In addition to the subset of C and C++ commands that you can use is a list of
reserved keywords used and recognized by C and C++ that you cannot abbreviate,
use as variable names, or use as any other type of identifier.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
“C reserved keywords” on page 325
z/OS XL C/C++ Language Reference
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Accessing C and C++ program variables”
“Displaying values of C and C++ variables or expressions”
“Assigning values to C and C++ variables” on page 321
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Choosing TEST or DEBUG compiler suboptions for C programs” on page 39
“Choosing TEST or DEBUG compiler suboptions for C++ programs” on page 44
Debug Tool sets a breakpoint at line 25 (AT), begins execution of the program (GO),
stops at line 25, and displays the variable names and their values.
Debug Tool sets a breakpoint at line 25 (AT), begins execution of the program (GO),
stops at line 25, and displays the result of the expression.
Put commas between the variables when listing more than one. If you do not want
to display the variable names when issuing the LIST command, enter LIST
UNTITLED.
You can also list variables with the printf function call as follows:
printf ("X=%d, row=%d, col=%d\n", X, row[X], col[X]);
The output from printf, however, does not appear in the Log window and is not
recorded in the log file unless you SET INTERCEPT ON FILE stdout.
Note: Only the assignment operators that work for C will work for C++, that is,
there is no support for overloaded operators.
The following example demonstrates how to assign the value of number to the
member employee of the structure payroll:
payroll.employee = number;
Debug Tool supports all C operators except the tenary operator, as well as any
other full C language assignments and function calls to user or C library functions.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Calling C and C++ functions from Debug Tool” on page 324
Values in the range 3–17 can only be assigned to %PATHCODE if your program was
compiled with an option supporting path hooks.
You can only declare scalars, arrays of scalars, structures, and unions in Debug
Tool (pointers for the above are allowed as well).
If you declare a session variable with the same name as a programming variable,
the session variable hides the programming variable. To reference the
programming variable, you must qualify it. For example:
main:>x for the program variable x
x for the session variable x
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Using session variables across different programming languages” on page 412
“Qualifying variables and changing the point of view in C and C++” on page
335
C and C++ language expressions are arranged in the following groups based on
the operators they contain and how you use them:
Primary expression
Unary expression
Binary expression
Conditional expression
Assignment expression
Comma expression
lvalue
Constant
The semantics for C and C++ operators are the same as in a compiled C or C++
program. Operands can be a mixture of constants (integer, floating-point,
character, string, and enumeration), C and C++ variables, Debug Tool variables,
or session variables declared during a Debug Tool session. Language constants are
specified as described in the C and C++ Language Reference publications.
The Debug Tool command DESCRIBE ATTRIBUTES can be used to display the
resultant type of an expression, without actually evaluating the expression.
The C and C++ language does not specify the order of evaluation for function call
arguments. Consequently, it is possible for an expression to have a different
execution sequence in compiled code than within Debug Tool. For example, if you
enter the following in an interactive session:
int x;
int y;
x = y = 1;
the results can differ from results produced by the same statements located in a C
or C++ program segment. Any expression containing behavior undefined by ANSI
standards can produce different results when evaluated by Debug Tool than when
evaluated by the compiler.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
“Debug Tool evaluation of C and C++ expressions” on page 327
z/OS XL C/C++ Language Reference
You can make calls to C library functions at any time. In addition, you can use the
C library variables stdin, stdout, stderr, __amrc, and errno in expressions
including function calls.
The library function ctdli cannot be called unless it is referenced in a compile unit
in the program, either main or a function linked to main.
Calls to user functions can be made, provided Debug Tool is able to locate an
appropriate definition for the function within the symbol information in the user
program. These definitions are created when the program is compiled with
TEST(SYM) for C or TEST for C++.
You can turn off this checking by specifying SET WARNING OFF.
Calls can be made to any user functions that have linkage supported by the C or
C++ compiler. However, for C++ calls made to any user function, the function
must be declared as:
extern "C"
For example, use this declaration if you want to debug an application signal
handler. When a condition occurs, control passes to Debug Tool which then passes
control to the signal handler.
Debug Tool attempts linkage checking, and does not perform the function call if it
determines there is a linkage mismatch. A linkage mismatch occurs when the target
program has one linkage but the source program believes it has a different linkage.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Choosing TEST or DEBUG compiler suboptions for C programs” on page 39
“Choosing TEST or DEBUG compiler suboptions for C++ programs” on page 44
Related references
z/OS XL C/C++ Language Reference
C reserved keywords
The table below lists all keywords reserved by the C language. When the current
programming language is C or C++, these keywords cannot be abbreviated, used
as variable names, or used as any other type of identifiers.
Debug Tool evaluates C and C++ expressions following the rules presented in z/OS
XL C/C++ Language Reference. The result of an expression is equal to the result that
would have been produced if the same expression had been part of your compiled
program.
Implicit string concatenation is supported. For example, "abc" "def" is accepted for
"abcdef" and treated identically. Concatenation of wide string literals to string
literals is not accepted. For example, L"abc"L"def" is valid and equivalent to
L"abcdef", but "abc" L"def" is not valid.
Expressions you use during your session are evaluated with the same sensitivity to
enablement as are compiled expressions. Conditions that are enabled are the same
ones that exist for program statements.
During a Debug Tool session, if the current setting for WARNING is ON, the occurrence
in your C or C++ program of any one of the conditions listed below causes the
display of a diagnostic message.
v Division by zero
v Remainder (%) operator for a zero value in the second operand
v Array subscript out of bounds for a defined array
v Bit shifting by a number that is either negative or greater than 32
v Incorrect number of parameters, or parameter type mismatches for a function
call
v Differing linkage calling conventions for a function call
v Assignment of an integer value to a variable of enumeration data type where the
integer value does not correspond to an integer value of one of the enumeration
constants of the enumeration data type
v Assignment to an lvalue that has the const attribute
v Attempt to take the address of an object with register storage class
v A signed integer constant not in the range -2**31 to 2**31
v A real constant not having an exponent of 3 or fewer digits
v A float constant not larger than 5.39796053469340278908664699142502496E-79 or
smaller than 7.2370055773322622139731865630429929E+75
v A hex escape sequence that does not contain at least one hexadecimal digit
v An octal escape sequence with an integer value of 256 or greater
v An unsigned integer constant greater than the maximum value of 4294967295.
Note: Although you can intercept IOStreams indirectly via C/370 I/O, the
behaviors might be different or undefined in C++.
You can use the following names with the SET INTERCEPT command during a
debug session:
v stdout, stderr, and stdin (lowercase only)
v any valid fopen() file specifier.
The behavior of I/O interception across system() call boundaries is global. This
implies that the setting of INTERCEPT ON for xx in Program A is also in effect for
Program B (when Program A system() calls to Program B). Correspondingly,
setting INTERCEPT OFF for xx in Program B turns off interception in Program A
when Program B returns to A. This is also true if a file is intercepted in Program B
and returns to Program A. This model applies to disk files, memory files, and
standard streams.
Command line redirection of the standard streams is supported under Debug Tool,
as shown below.
1>&2 If stderr is the target of the interception command, stdout is also
intercepted. If stdout is the target of the INTERCEPT command, stderr is
not intercepted. When INTERCEPT is set OFF for stdout, the stream is
redirected to stderr.
2>&1 If stdout is the target of the INTERCEPT command, stderr is also
intercepted. If stderr is the target of the INTERCEPT command, stdout is
not intercepted. When INTERCEPT is set OFF for stderr, the stream is
redirected to stdout again.
1>file.name
stdout is redirected to file.name. For interception of stdout to occur,
stdout or file.name can be specified on the interception request. This also
applies to 1>>file.name
The same standard stream cannot be redirected twice on the command line.
Interception is undefined if this is violated, as shown below.
2>&1 2>file.name
Behavior of stderr is undefined.
1>&2 1>file.name
Behavior of stdout is undefined.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
z/OS XL C/C++ Programming Guide
Note: The use of an object here is not to be confused with a C++ object. Any
reference to C++ will be qualified as such.
For C++, in addition to the scopes defined for C, it also has the class scope.
An object has block scope if its declaration is located inside a block. An object with
block scope is visible from the point where it is declared to the closing brace (})
that terminates the block.
An object has file scope if its definition appears outside of any block. Such an
object is visible from the point where it is declared to the end of the source file. In
Debug Tool, if you are qualified to the compilation unit with the file static
variables, file static and global variables are always visible.
An object has function prototype scope if its declaration appears within the list of
parameters in a function prototype.
A class member has class scope if its declaration is located inside a class.
You cannot reference objects that are visible at function prototype scope, but you
can reference ones that are visible at file or block scope if:
v For C variables and functions, the source file was compiled with TEST(SYM) and
the object was referenced somewhere within the source.
v For C variables declared in a block that is nested in another block, the source file
was compiled with TEST(SYM, BLOCK).
v For line numbers, the source file was compiled with TEST(LINE) GONUMBER.
v For labels, the source file was compiled with TEST(SYM, PATH). In some cases
(for example, when using GOTO), labels can be referenced if the source file was
compiled with TEST(SYM, NOPATH).
Debug Tool follows the same scoping rules as ANSI, except that it handles objects
at file scope differently. An object at file scope can be referenced from within
Debug Tool at any point in the source file, not just from the point in the source file
where it is declared. Debug Tool session variables always have a higher scope than
program variables, and consequently have higher precedence than a program
variable with the same name. The program variable can always be accessed
through qualification.
Session variables declared during the Debug Tool session are also available for
reference and change.
An object with auto storage class is available for reference or change in Debug
Tool, provided the block where it is defined is active. Once a block finishes
executing, the auto variables within this block are no longer available for change,
but can still be examined using DESCRIBE ATTRIBUTES.
An object with register storage class might be available for reference or change in
Debug Tool, provided the variable has not been optimized to a register.
An object with extern storage class is always available for change or reference in
Debug Tool. It might also be possible to reference such a variable in a program
even if it is not defined or referenced from within this source file. This is possible
provided Debug Tool can locate another compile unit (compiled with TEST(SYM))
with the appropriate definition.
When these block names are used in the Debug Tool commands, you might need
to distinguish between nested blocks in different functions within the same source
file. This can be done by naming the blocks in one of two ways:
Short form
function_name:>%BLOCKzzz
Long form
function_name:>%BLOCKxxx :>%BLOCKyyy: ... :>%BLOCKzzz
The currently active block name can be retrieved from the Debug Tool variable
%BLOCK. You can display the names of blocks by entering:
DESCRIBE CU;
You must always refer to a C++ block identifier in its entirety, even if the function
is not overloaded. That is, you cannot refer to shapes(int,int) as shapes only.
Note: The block name for main() is always main (without the qualifying
parameters after it) even when compiled with C++ because main() has extern C
linkage.
and the name will be shown in its entirety (wrapped) in the session log.
Block identifiers are restricted to a length of 255 characters. Any name longer than
255 characters is truncated.
main()
{
>>> Debug Tool is given <<<
>>> control here. <<<
init();
sort();
}
init()
{
. table = malloc(sizeof(long)*length);
.
.
}
sort ()
{ /* Block sort */
int i;
for (i = 0; i < length–1; i++) { /* If compiled with ISD, Block %BLOCK2; */
/* if compiled with DWARF, Block %BLOCK8 */
int j;
for (j = i+1; j < length; j++) { /* If compiled with ISD, Block %BLOCK3; */
/* if compiled with DWARF, Block %BLOCK13 */
static int temp;
temp = table[i];
table[i] = table[j];
table[j] = temp;
}
}
}
The block scope variables i, j, and temp are not visible in this scope and cannot be
directly referenced from within Debug Tool at this time. You can list the line
numbers in the current scope by entering:
Now let's assume the program is compiled with TEST(SYM, NOBLOCK). Since the
program is explicitly compiled using NOBLOCK, Debug Tool will never know about
the variables j and temp because they are defined in a block that is nested in
another block. Debug Tool does know about the variable i since it is not in a scope
that is nested.
If program is compiled with the ISD If program is compiled with the DWARF
compiler option compiler option
sort sort
%BLOCK2 %BLOCK8
%BLOCK3 %BLOCK13
The following examples set a breakpoint on entry to the second block of sort:
v If program is compiled with the ISD compiler option: at entry sort:>%BLOCK2;.
v If program is compiled with the DWARF compiler option: at entry
sort:>%BLOCK8;.
The following example sets a breakpoint on exit of the first block of main and lists
the entries of the sorted table.
at exit main {
for (i = 0; i < length; i++)
printf("table entry %d is %d\n", i, table[i]);
}
The following examples list the variable temp in the third block of sort. This is
possible because temp has the static storage class.
v If program is compiled with the ISD compiler option: LIST sort:>
%BLOCK3:temp;.
v If program is compiled with the DWARF compiler option: LIST
sort:>%BLOCK13:temp;.
Issuing DESCRIBE ENVIRONMENT displays a list of open files and conditions being
monitored by the run-time environment. For example, if you enter DESCRIBE
ENVIRONMENT while debugging a C or C++ program, you might get the following
output:
Currently open files
stdout
sysprint
The following conditions are enabled:
SIGFPE
SIGILL
SIGSEGV
SIGTERM
When program execution is suspended and Debug Tool receives control, the
default, or implicit qualification is the active block at the point of program
suspension. All objects visible to the C or C++ program in this block are also
visible to Debug Tool. Such objects can be specified in commands without the use
of qualifiers. All others must be specified using explicit qualification.
Qualifiers depend, of course, upon the naming convention of the system where
you are working.
These are known as qualifiers and some, or all, might be required when
referencing an object in a command. Qualifiers are separated by a combination of
greater than signs (>) and colons and precede the object they qualify. For example,
the following is a fully qualified object:
load_name::>cu_name:>block_name:>object
If required, load_name is the name of the load module. It is required only when the
program consists of multiple load modules and when you want to change the
qualification to other than the current load module. load_name is enclosed in
quotation marks ("). If it is not, it must be a valid identifier in the C or C++
programming language. load_name can also be the Debug Tool variable %LOAD.
If required, CU_NAME is the name of the compilation unit or source file. The
cu_name must be the fully qualified source file name or an absolute pathname. It is
required only when you want to change the qualification to other than the
currently qualified compilation unit. It can be the Debug Tool variable %CU. If there
appears to be an ambiguity between the compilation unit name, and (for example),
a block name, you must enclose the compilation unit name in quotation marks (").
If required, block_name is the name of the block. block_name can be the Debug Tool
variable %BLOCK.
Refer to the following topics for more information related to the material discussed
in this topic.
Related concepts
“Blocks and block identifiers for C” on page 332
. table = malloc(sizeof(long)*length);
.
.
pf = fetch("SORTMOD");
. (*pf)(table);
.
.
. release(pf);
.
.
}
When Debug Tool receives control, variables i, j, temp, table, and length can be
specified without qualifiers in a command. If variable sn is referenced, Debug Tool
uses the variable that is a float. However, the names of the blocks and compile
units differ, maintaining compatibility with the operating system.
Qualifying variables in C
v Change the file scope variable length defined in the compilation unit
MVSID.SORTSUB.C in the load module SORTMOD:
"SORTMOD"::>"MVSID.SORTSUB.C":>length = 20;
v Assume Debug Tool gained control from main(). The following changes the
variable length:
%LOAD::>"MVSID.SORTMAIN.C":>length = 20;
Because length is in the current load module and compilation unit, it can also
be changed by:
length = 20;
v Assume Debug Tool gained control as shown in the example program above.
You can break whenever the variable temp in load module SORTMOD changes
in any of the following ways:
AT CHANGE temp;
AT CHANGE %BLOCK3:>temp;
AT CHANGE sort:%BLOCK3:>temp;
AT CHANGE %BLOCK:>temp;
AT CHANGE %CU:>sort:>%BLOCK3:>temp;
AT CHANGE "MVSID.SORTSUB.C":>sort:>%BLOCK3:>temp;
AT CHANGE "SORTMOD"::>"MVSID.SORTSUB.C":>sort:>%BLOCK3:>temp;
The %BLOCK and %BLOCK3 variables in this example assume the program was
compiled with the ISD compiler option. If the example was compiled with the
DWARF compiler option, enter the DESCRIBE PROGRAM command to determine the
correct %BLOCK variables.
If you are debugging a program that calls a function that resides in a header file,
the cursor moves to the applicable header file. You can then view the function
source as you step through it. Once the function returns, debugging continues at
the line following the original function call.
You can step around a header file function by issuing the STEP OVER command.
This is useful in stepping over Library functions (for example, string functions
defined in string.h) that you cannot debug anyway.
A block identifier can be quite long, especially with templates, nested classes, or
class with many levels of inheritance. In fact, it might not even be obvious at first
as to the block name for a particular function. To set a breakpoint for these
nontrivial blocks can be quite cumbersome. Therefore, it is recommended that you
make use of DESCRIBE CU and retrieve the block identifier from the session log.
When you do a DESCRIBE CU, the methods are always shown qualified by their
class. If a method is unique, you can set a breakpoint by using just the method
name. Otherwise, you must qualify the method with its class name. The following
two examples are equivalent:
AT ENTRY method()
AT ENTRY classname::method()
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Composing commands from lines in the Log and Source windows” on page
174
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Example: displaying attributes of C++ objects”
line edge;
A obj;
You can also display the static member by referencing it as A::y since each object
of class A has the same value.
If you are within a member function of A and want to display the value of x at file
scope, enter LIST ::x. If you do not use ::, entering LIST x will display the value
of x for the current object (i.e., this–>x).
You can list the contents of storage in various ways. Using the LIST REGISTERS
command, you can receive a list of the contents of the General Purpose Registers
or the floating-point registers.
If you compile the program above using the compiler options TEST(ALL),LIST, then
your pseudo assembly listing will be similar to the listing shown below.
* int dbl(int j)
ST r1,152(,r13)
* {
EX r0,HOOK..PGM-ENTRY
* return 2*j;
EX r0,HOOK..STMT
L r15,152(,r13)
L r15,0(,r15)
SLL r15,1
B @5L2
DC A@5L2-ep)
NOPR
@5L1 DS 0D
* }
@5L2 DS 0D
EX r0,HOOK..PGM-EXIT
After a few steps, Debug Tool halts on line 1 (the program entry hook, shown in
the listing above). Another STEP takes you to line 3, and halts on the statement
hook. The next STEP takes you to line 4, and halts on the program exit hook. As
indicated by the pseudo assembly listing, only register 15 has changed during this
STEP, and it contains the return value of the function. In the Monitor window,
register 15 now has the value 0x00000014 (decimal 20), as expected.
You can change the value from 20 to 8 just before returning from dbl() by issuing
the command:
%GPR15 = 8 ;
If you are debugging an assembler CU and later decide you want to debug a
disassembly CU, you can enter the SET DISASSEMBLY ON command after you enter
the SET ASSEMBLER ON command.
Debug Tool locates the debug information in a data set with the following name:
yourid.EQALANGX(mypgm). If Debug Tool finds this data set, you can begin to debug
your assembler program. Otherwise, enter the SET SOURCE or SET DEFAULT LISTINGS
command to indicate to Debug Tool where to find the debug information. In
remote debug mode, the remote debugger prompts you for the data set
information when the program is stepped into.
The information displayed in the Source window is similar to the listing generated
by the assembler. The Source window displays the following information:
▌1▐ statement number
The statement number is a number assigned by the EQALANGX program.
Use this column to set breakpoints and identify statements.
The same statement number can sometimes be assigned to more than one
line. Comments, labels and macro invocations are assigned the same
statement number as the machine instruction that follows these statements.
All of these statements have the same offset within the CSECT, which
allows you to put the cursor on any of these lines and press PF6 to set a
breakpoint. When the statement is reached, the focus is set on the last line
within the statement that contains either a macro invocation or a machine
instruction.
▌2▐ An asterisk in the column preceding the offset indicates that the line is
contained in a compile unit to which you are not currently qualified.
Before you attempt to set a line or statement breakpoint on that a line, you
must enter the SET QUALIFY CU compile_unit and specify the name of the
containing compile unit for the compile_unit parameter.
▌3▐ offset
The offset from the start of the CSECT. This column matches the left-most
column in the assembler listing.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Debug Tool Reference and Messages
BCR 15,x
(07Fx)
3 Control has reached a Any Label whose offset
label coded in the corresponds to an
program. instruction.
BASSM R14,R15
(0CEF)
SVC (0A)
PC (B218)
BAL (45) Except BAL 1,xxx is
not considered a
CALL
BAS (4D)
BALR x,y
(05)
BASR x,y
(0D)
BASSM x,y
(0C)
BRAS (A7x5)
BRASL (C0x5)
5 Control is returning Statement after If the statement after
from a CALL. CALL a CALL is an
instruction, it gets an
entry here.
6 A conditional branch BC x (47x) x^=15 & X^=0
is about to be
BCR x (07x) x^=15 & X^=0
executed.
BCT (46)
BCTR (06)
BCTGR (B946)
BXH (86)
BXHG (EB44)
BXLE (87)
BXLEG (EB45)
BRC x (A7x4) x^=15 & X^=0
BRCL (C0x4)
BRCT (A7x6)
BRCTG (A7x7)
BRXH (84)
BRXHG (EC44)
BRXLE (85)
BRXLG (EC45)
BRCL 15,x
(C0F4)
BSM (0B)
You can use the following commands to control the view that you see in the
Source window for an assembler program:
v SET DEFAULT VIEW is used to indicate the initial view that you see. The
setting that is in effect for SET DEFAULT VIEW when you enter the
LOADDEBUGDATA (LDD) command for an assembler program determines the
initial view for that program.
v QUERY DEFAULT VIEW can be used to see the current setting of SET
DEFAULT VIEW.
v QUERY CURRENT VIEW can be used to determine the view in effect for the
currently qualified CU.
The following descriptions apply only to full screen mode and line mode
debugging. There are no corresponding features for supporting debugging of
non-reentrant assembler when using the remote debugger.
After you obtain the address, enter the SET QUALIFY address; command, where
address is an address in the specific compile unit you identified.
For example, Debug Tool cannot process the following code correctly:
Entry1 BRAS 15,0
NOPR 0
B Common
Entry2 BRAS 15,0
NOPR 4
Common DS 0H
IC 15,1(15)
In this code, the IC is used to examine the second byte of the NOPR instructions.
However, if the NOPR instructions are replaced by an SVC to create a breakpoint,
a value that is neither 0 nor 4 might be obtained, which causes unexpected results
in the user program.
You can use the following coding techniques can be used to eliminate this
problem:
v Method 1: Change the code to reference constants instead of instructions.
v Method 2: Define the referenced instructions by using DC instructions instead of
executable instructions.
Using Method 1, you can change the above example to the following code:
Entry1 BAL 15,*+L’*+2
DC H’0’
B Common
Entry2 BAL 15,*+L’*+2
DC H’4’
Common DS 0H
IC 15,1(15)
Using Method 2, you can change the above example to the following code:
Entry1 BRAS 15,0
DC X’0700’
B Common
Entry2 BRAS 15,0
DC X’0704’
Common DS 0H
IC 15,1(15)
Any self-modifying code that does not meet one of these criteria is classified as
non-detectable.
Code that modifies an instruction defined Code that modifies an instruction defined
by an instruction op-code by a DC
ModInst BC 0,Target ModInst DC X’4700’,S(Target)
... ...
MVI ModInst+1,X’F0’ MVI ModInst+1,X’F0’
If you are not familiar with the program that you are debugging, we recommend
that you have a copy of the listing that was created by the compiler or High Level
Assembler (HLASM) available while you debug the program. There are no special
assembly or compile requirements that the program must comply with to use the
disassembly view.
If you are debugging an assembler CU and later decide you want to debug a
disassembly CU, you can enter the SET DISASSEMBLY ON command after you enter
the SET ASSEMBLER ON command.
If you enter a program that does contain debug data, the language setting does not
change and the Source window does not display disassembly code.
When you use the disassembly view, the disassembly instructions displayed in the
source area are not guaranteed to be accurate because it is not always possible to
distinguish data from instructions. Because of the possible inaccuracies, we
recommend that you have a copy of the listing that was created by the compiler or
by HLASM. Debug Tool keeps the disassembly view as accurate as possible by
refreshing the Source window whenever it processes the machine code, for
example, after a STEP command.
If you try to step back into the program that called your program, set a breakpoint
at the instruction to which you return in the calling program. If you try to step
over another program, set a breakpoint immediately after the instruction that calls
another program. When you try to step out of your program, Debug Tool displays
a warning message and lets you set the appropriate breakpoints. Then you can do
the step.
Debug Tool refreshes the disassembly view whenever it determines that the
disassembly instructions that are displayed are no longer correct. This refresh can
happen while you are stepping through your program.
Debug Tool lets you set breakpoints anywhere within the starting and ending
address range of the CU or CSECT provided that the address appears to be a valid
op-code and is an even number offset. To avoid setting breakpoints at the wrong
offset, we recommend that you verify the offset by referring to a copy of the listing
that was created by the compiler or by HLASM.
You can also use assembler statements to display and modify storage. For example,
to set the four bytes located by the address in register 2 to zero, enter the following
command:
R2-> <4>=0
To verify that the four bytes are set to zero, enter the following command:
LIST R2->
When you debug a program through the disassembly view, Debug Tool cannot
stop the application in any of the following situations:
v The program does not comply with the first three restrictions that are listed
above.
v Between the following instructions:
– After the LE stack extend has been called in the prologue code, and
– Before R13 has been set with a savearea or DSA address and the backward
pointer has been properly set.
The application runs until Debug Tool encounters a valid save area backchain.
The topics below describe the steps you need to follow to use Debug Tool to
debug your DB2 programs.
v Chapter 7, “Preparing a DB2 program,” on page 79
v “Processing SQL statements” on page 79
v “Linking DB2 programs for debugging” on page 81
v “Binding DB2 programs for debugging” on page 82
v “Debugging DB2 programs in batch mode”
v “Debugging DB2 programs in full-screen mode” on page 364
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 7, “Preparing a DB2 program,” on page 79
DB2 UDB for z/OS Application Programming and SQL Guide
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 7, “Preparing a DB2 program,” on page 79
The Debug Tool Setup Utility is available through Debug Tool Utilities.
1. Start DTSU by using the TSO command or the ISPF panel option, if available.
Contact your system administrator to determine if the ISPF panel option is
available.
2. Create a setup file. Remember to select the Initialize New setup file for DB2
field.
3. Enter appropriate information for all the fields. Remember to enter the proper
commands in the DSN command options and the RUN command options
fields.
4. Enter the RUN command to run the DB2 program.
After your program has been initiated, debug your program by issuing the
required Debug Tool commands.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 7, “Preparing a DB2 program,” on page 79
“Starting Debug Tool for programs that start outside of Language
Environment” on page 143
Related references
DB2 UDB for z/OS Administration Guide
Before you begin, verify that you have completed all the tasks described in
Chapter 8, “Preparing a DB2 stored procedures program,” on page 83. The
program resides in an address space that is separate from the calling program. The
stored procedure can be called by another application or a tool such as the IBM
DB2 Development Center.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 8, “Preparing a DB2 stored procedures program,” on page 83
“Resolving some common problems while debugging DB2 stored procedures”
Related references
DB2 Application Programming and SQL Guide
| Using the IMS Transaction Isolation facility, you can do the following tasks:
| 1. Display a list of transactions available for a given IMS subsystem.
| 2. From that list of transactions, register to debug a specific transaction in a
| private message region that is created for your use.
| 3. For transactions you are registered to debug, specify other pattern-matching
| information, such as the content of messages that are sent to the transaction.
| This allows you to trap the transaction under specific conditions.
| 4. Start a private message-processing region based on the execution environment
| of a selected transaction. The private message-processing region is configured
| to use delay debug mode, and is hardcoded to read delay debug preferences
| from your delay debug profile data set.
| 5. Customize your private message region by supplying personal libraries for the
| STEPLIB concatenation.
Note: If your source (C and C++) or listing (COBOL and PL/I) does not come up
in Debug Tool when you launch it, check that the source or listing file name
corresponds to the MVS library name, and that you have at least read access to
that MVS library.
For example, you can allocate a data set, userid.CODE.BTSINPUT with individual
members of test input data for IMS transactions under BTS.
After you finish debugging your program, you can do one of the following:
v Continue debugging another program.
v Disable debugging and continue running the region for other tasks.
v Disable debugging and shut down the region. If you want to debug an IMS
programs, you have to repeat tasks 2 to 4.
After you choose a debugging interface, run the EQASET transaction as described
in “Running the EQASET transaction for non-Language Environment IMS MPPs.”
After you enter an EQASET command, on the same terminal, start the transaction
that is associated with the application program that you want to debug.
To request information about your existing preferences, enter the command EQASET
STATUS.
To re-enable a debugging session after using EQASET OFF, enter the command
EQASET ON.
►► EQASET MFI= ►◄
terminal_LU_name
network_identifier.
VTAM=
user_ID
TCP=
IP_address % port_number
VTCP=
IP_address % port_number
ON
OFF
STATUS
The EQASET transaction manages a separate debugging setting for each user that
runs the transaction. Each setting is identified by the user ID that is used to log on
to the terminal where the transaction is run. For any user ID, only the last
debugging preference (MFI, TCP, VTCP, or VTAM) entered is saved. You can use
the STATUS option to see the current debugging preference.
The following TEST runtime option string is constructed with the debugging
preference:
TEST(ALL,INSPIN,,debuggingPreference:*)
When you use the EQASET transaction for Language Environment MPPs, it
associates the current IMS LTERM ID with the specified TSO user ID. EQADICXT
can construct a valid name for the MVS data set using the TSO user ID for the
&USERID token.
TSOID=
Identify a TSO user ID to use in place of the &USERID token in the Language
Environment user exit. The TSO user ID must match the user ID used to create
the data set name, as described in “Creating and managing the TEST runtime
options data set” on page 111.
STATUS
Display the current value for TSOID.
This option might also display information about debugging preferences for
non-Language Environment MPPs.
Creating setup file for your IMS program by using Debug Tool Utilities
You can create setup files for your IMS Batch Messaging Process (BMP) program
which describe how to create a custom region and defines the STEPLIB
concatenation statements that reference the data sets for your IMS program's load
module and the Debug Tool load module. You can also create and customize a
setup file to create a private message region that you can use to test your IMS
message processing program (MPP). Creating a private message region with class
X allows you to test your IMS program run by transaction X and reduce the risk of
interfering with other regions being used by other IMS programs.
To create a setup file for your IMS program by using Debug Tool Utilities, do the
following steps:
1. Start Debug Tool Utilities. If you do not know how to start Debug Tool
Utilities, see “Starting Debug Tool Utilities” on page 9.
2. In the Debug Tool Utilities panel (EQA@PRIM), type 4 in the Option line and
press Enter.
3. In the Manage IMS Programs panel (EQAPRIS), type 2 in the Option line and
press Enter.
4. In the Create Private Message Regions - Edit Setup File panel (EQAPFORA),
type in the information to create a new setup file or edit an existing setup file.
Press Enter.
Create a private message region to customize your application or Debug Tool
libraries while you debug your application so that you do not impact other
user's activities. Consult your system administrator for authorization and rules
regarding the creation of private message regions.
After you specify the setup information required to run your IMS program, you
can specify the information needed to create a private message region you can
use to test your IMS program or specify how to run a BMP program. To specify
this setup information, do the following steps:
5. In the Edit Setup File panel (EQAPFORI), type in the information to start IMS
batch processor. Type a forward slash (/) in the field Enter / to modify
parameters, then press Enter to modify parameters for the batch processor.
After you start an IMS transaction, IMS loads and runs the application program
associated with that transaction. IMS manages all the messages requested by and
returned to that application program, along with all the messages requested by
and returned to other application programs running at the same time. IMS uses the
processing limit count (PLCT) and other tools to ensure that application programs
get the appropriate share of resources. As long as your IMS application program
does not exceed the PLCT9, it continues running and processing messages or
waiting for the next message. However, if you are trying to debug the application
program, the continued message processing or waiting for messages might make
Debug Tool appear unresponsive. To avoid this situation, try one of the following
options at the beginning of your debug session, before you begin running the
application program (for example, by entering the GO command):
v Set a breakpoint as close as possible to the area you want to debug.
v Set a breakpoint at the GU call statement.
Related references
IMS System Definition Reference
9. IMS Quick reschedule allows application programs to process more than the PLCT for each physical schedule. Quick reschedule
helps eliminate processing overhead caused by unnecessary rescheduling and reloading of application programs.
Before you can debug your programs under CICS, verify that you have completed
the following tasks:
v Ensured that all of the required installation and configuration steps for CICS
Transaction Server, Language Environment, and Debug Tool have been
completed. For more information, refer to the installation and customization
guides for each product.
v Completed all the tasks in the following topics:
– Chapter 3, “Planning your debug session,” on page 23
– Chapter 4, “Updating your processes so you can debug programs with Debug
Tool,” on page 61
– Chapter 9, “Preparing a CICS program,” on page 87
– Chapter 17, “Starting Debug Tool under CICS,” on page 147
To display a list of containers in the current channel, enter the command DESCRIBE
CHANNEL. To display a list of containers in another channel, enter the command
DESCRIBE CHANNEL channel_name, where channel_name is the name of a specific
channel. In either case, Debug Tool displays a list similar to the following list:
To display the contents of a container in the current channel, enter the command
LIST CONTAINER container_name, where container_name is the name of a particular
channel. To display the contents of a container in another channel, enter the
command LIST CONTAINER channel_name container_name, where channel_name is
the name of another channel. In either case, Debug Tool displays the contents of
the container in a format similar to the following diagram:
Refer to the following topics for more information related to the material discussed
in this topic.
v Related references
v DESCRIBE CHANNEL command in Debug Tool Reference and Messages
v LIST CONTAINER command in Debug Tool Reference and Messages
The DISABLE command works with the debugging profile that started the current
debugging session to prevent programs from being debugged. When you enter the
DISABLE command, you specify the name, or part of the name, of a load module,
compile unit, or both, that you do not want to debug. When Debug Tool finds a
load module, compile unit, or both, whose name matches the name or part of the
name (a pattern) that you specified, Debug Tool does not debug that program.
When you enter the ENABLE command, you specify the pattern (the full name or
part of a name of a load module, compile unit, or both) that you want to debug.
The pattern must match the name of a load module, compile unit, or both, that
you specified in a previously entered DISABLE command.
To use the DISABLE command to prevent Debug Tool from debugging a program,
do the following steps:
1. If you don't remember what programs you might have disabled, enter the
command LIST DTCN or LIST CADP. This command lists the programs you have
already disabled. This step reminds you of the names of load modules,
programs, or compile units you already disabled.
2. If you are running with a CADP profile, enter the command DISABLE CADP
PROGRAM program_name CU compile_unit_name. program_name is the name of the
program, or it matches the pattern of the name of a program, that you specified
in the Program field and it is the program that you do not want to debug.
compile_unit_name is the name of the compile unit, or it matches the pattern of
the name of a compile unit, that you specified in the Compile Unit field and it
is the compile unit that you do not want to debug. You can specify PROGRAM
program_name, CU compile_unit_name, or both.
For example, if you have the following circumstances, enter the command
DISABLE CADP PROGRAM ABD2 to prevent Debug Tool from debugging the
program ABD2:
v You specified ABD* in the Program field of the profile.
v You have programs with the name ABD1, ABD2, ABD3, ABD4, and ABD5.
3. If you are running with a DTCN profile, enter the command DISABLE DTCN
LOADMOD load_module_name CU compile_unit_name. load_module_name is the
name of the load module, or it matches the pattern of the name of a load
module, that you specified in the LoadMod field and it is the load module that
you do not want to debug. compile_unit_name is the name of the compile unit,
or it matches the pattern of the name of a compile unit, that you specified in
the CU field and it is the compile unit that you do not want to debug. You can
specify LOADMOD load_module_name, CU compile_unit_name, or both.
For example, if you have the following circumstances, enter the command
DISABLE DTCN CU STAR2 to prevent Debug Tool from debugging the compile
unit STAR2:
v You specified STAR* in the CU field of the profile.
v You have compile units with the names STAR1, STAR2, STAR3, STAR4, and
STAR5.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
DISABLE command in Debug Tool Reference and Messages
ENABLE command in Debug Tool Reference and Messages
LIST CADP or DTCN command in Debug Tool Reference and Messages
To prevent Debug Tool from stopping at every EXEC CICS RETURN statement in your
application and suppress this message, set the TEST level to ERROR by using the
SET TEST ERROR command.
To instruct Debug Tool to check for storage violations, enter the command CHKSTGV.
Debug Tool checks the task that you are debugging for storage violations.
You can instruct Debug Tool to check for storage violations more frequently by
including the command as part of a breakpoint. For example, the following
commands check for a storage violation at each statement in a COBOL program
and causes Debug Tool to stop if a violation is detected in the current procedure:
AT STATEMENT *
PERFORM
CHKSTGV ;
IF %RC = 0 THEN
GO ;
END-IF ;
END-PERFORM ;
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
CICS Problem Determination Guide
You set switches by using the SET command. The SAVE BPS and SAVE
MONITORS switches enable the saving of breakpoints and monitor specifications
between debugging sessions. The RESTORE BPS and RESTORE MONITORS
switches control the restoring of breakpoints and monitor specifications at the start
of subsequent debugging sessions. Setting these switches to AUTO enables the
automatic saving and restoring of this information. You must also enable the SAVE
SETTING AUTO switch so that these settings are in effect at the start of
subsequent debugging sessions.
When you activate a DTCN profile for a full-screen debugging session and SAVE
BPS, SAVE MONITORS, RESTORE BPS, and RESTORE MONITORS all specify
NOAUTO, Debug Tool saves most of the breakpoint and LOADDEBUGDATA
information for that session into the profile. When the DTCN profile is deleted, the
breakpoint and LOADDEBUGDATA information is deleted.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Debug Tool Reference and Messages
| You need to provide TEST runtime options. This can be done in one of the
| following ways:
| v Edit the exec or panel that invokes the application and change the parameter
| string that is passed to the program to add the TEST runtime options.
| v Allocate a CEEOPTS DD that contains the TEST runtime options.
| v Edit the application source code to add a call to CEETEST.
| This method provides the simplest way to debug only the ISPF application
| subroutine that you want to debug.
| You need to select a display device for your Debug Tool session. This can be done
| in one of the following ways:
| v Specify a display device by using the TEST runtime options.
| – Use the same 3270 terminal as ISPF is using. When you run your program,
| specify the MFI suboption of the TEST runtime option. The MFI suboption
| requires no additional values if you are going to use the same 3270 terminal
| as ISPF is using.
| TEST(ALL,*,PROMPT,MFI:*)
| PA2 refreshes the ISPF application panel and removes residual Debug Tool
| output from the emulator session. However, if Debug Tool sends output to
| the emulator session between displays of the ISPF application panels, you
| need to press PA2 after each ISPF panel displays.
| When you debug ISPF applications or applications that use line mode input
| and output, issue the SET REFRESH ON command. This command is executed
| and is displayed in the log output area of the Command/Log window.
| – Use a separate 3270 terminal using full-screen mode using the Terminal
| Interface Manager (TIM).
| When you run your program, specify the VTAM suboption of the TEST runtime
| option. The VTAM suboption requires that you specify your user ID, as in the
| following example:
| TEST(ALL,*,PROMPT,VTAM%user_id:*)
| – Use a separate 3270 terminal using full-screen mode using a dedicated
| terminal without Terminal Interface Manager.
| When you run your program, specify the MFI suboption of the TEST runtime
| option. The MFI suboption requires that you specify the VTAM LU name of
| the separate terminal that you started, as in the following example:
| TEST(ALL,*,PROMPT,MFI%terminal_id:*)
| – Use remote debug mode and a workstation application such as Rational
| Developer for System z.
| This declaration in the DATA DIVISION indicates using the same 3270 terminal
| that ISPF is using.
| 01 COMMAND-STRING.
| 05 AA PIC 99 Value 1 USAGE IS COMPUTATIONAL.
| 05 BB PIC x(60) Value ’;’.
| This declaration in the DATA DIVISION indicates using full-screen mode using the
| Terminal Interface Manager.
| 01 COMMAND-STRING.
| 05 AA PIC 99 Value 14 USAGE IS COMPUTATIONAL.
| 05 BB PIC x(60) Value ’VTAM%GYOUNG:*;’.
| This declaration in the DATA DIVISION indicates using remote debug mode.
| 01 COMMAND-STRING.
| 05 AA PIC 99 Value 24 USAGE IS COMPUTATIONAL.
| 05 BB PIC x(60) Value ’TCPIP&9.51.66.92%8001:*;’.
| The 2nd and 3rd options above are needed if you are debugging a batch ISPF
| program.
| These are the declarations needed in the DATA DIVISION for the 2nd parameter to
| CEETEST.
| 01 FC.
| 02 CONDITION-TOKEN-VALUE.
| COPY CEEIGZCT.
| 03 CASE-1-CONDITION-ID.
| 04 SEVERITY PIC S9(4) BINARY.
| 04 MSG-NO PIC S9(4) BINARY.
| 03 CASE-2-CONDITION-ID
| REDEFINES CASE-1-CONDITION-ID.
| 04 CLASS-CODE PIC S9(4) BINARY.
This section helps you determine how much of Debug Tool's testing functions you
want to continue using after you complete major testing of your application and
move into the final tuning phase. Included are discussions of program size and
performance considerations; the consequences of removing hooks, the statement
table, and the symbol table; and using Debug Tool on optimized programs.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Fine-tuning your programs for Debug Tool”
“Debugging without hooks, statement tables, and symbol tables” on page 395
“Debugging optimized COBOL programs” on page 396
Removing hooks
One option for increasing the performance of your program is to compile with a
minimum of hooks or with no hooks.
v For C programs, compiling with the option TEST(NOLINE,BLOCK,NOPATH) causes
the compiler to insert a minimum number of hooks while still allowing you to
perform tasks at block boundaries.
v For COBOL programs, compiling with the following compiler suboptions creates
programs that do not have hooks:
– TEST(NONE) for any release of the Enterprise COBOL for z/OS Version 3, or
COBOL OS/390 & VM, Version 2, compiler
– TEST(NOHOOK) for Enterprise COBOL for z/OS Version 4
– TEST for Enterprise COBOL for z/OS Version 5
Using the Dynamic Debug facility, Debug Tool inserts hooks while debugging
the program, allowing you to perform almost any debugging task.
Programs compiled with certain suboptions of the TEST compiler option have
hooks inserted at compile time. However, if the Dynamic Debug facility is
activated (which is the default, unless altered by the DYNDEBUG EQAOPTS command)
and the programs are compiled with certain compilers, the compiled-in hooks are
replaced with runtime hooks. This replacement is done to improve the
performance of Debug Tool. Certain path hook functions are limited when you use
the Dynamic Debug facility. To enable these functions, enter the SET DYNDEBUG OFF
command, which deactivates the Dynamic Debug facility. See Debug Tool Reference
and Messages for a description of these commands.
Before you remove them, however, you should consider their advantages. The
statement table allows you to display the execution history with statement
numbers rather than offsets, and error messages identify statement numbers that
are in error. The symbol table enables you to refer to variables and program
control constants by name. Therefore, you need to look at the trade-offs between
the size of your program and the benefits of having symbol and statement tables.
For programs that are compiled with the following compilers and with the
SEPARATE suboption of the TEST compiler option, the symbol tables are saved in a
separate debug file. This arrangement lets you to retain the symbol table
information and have a smaller program:
v Enterprise COBOL for z/OS, Version 4
v Enterprise COBOL for z/OS and OS/390, Version 3
v COBOL for OS/390 & VM, Version 2 Release 2
v COBOL for OS/390 & VM, Version 2 Release 1, with APAR PQ40298
v Enterprise PL/I for z/OS, Version 3.5 or later
For C and C++ programs compiled with the C/C++ compiler of z/OS, Version 1.6
or later, you can compile with the FORMAT(DWARF) suboption of the DEBUG compiler
option to save debug information in a separate debug file. This produces a smaller
program.
Programs compiled with the Enterprise COBOL for z/OS Version 5 compiler have
all of their debug information (including the symbol table) stored in a NOLOAD
segment of the program object. This segment is only loaded into memory when
you are debugging the program object.
When Debug Tool receives control in this limited environment, it does not know
what statement is in error (no statement table), nor can it locate variables (no
symbol table). Thus, you must use addresses and interpret hexadecimal data
values to examine variables. In this limited environment, you can:
v Determine the block that is in control:
list (%LOAD, %CU, %BLOCK);
or
list (%LOAD, %PROGRAM, %BLOCK);
v Determine the address of the error and of the compile unit:
list (%ADDRESS, %EPA); (where %EPA is allowed)
v Display areas of the program in hexadecimal format. Using your listing, you can
find the address of a variable and display the contents of that variable. For
example, you can display the contents at address 20058 in a C and C++ program
by entering:
LIST STORAGE (0x20058);
If your program does not contain a statement or symbol table, you can use session
variables to make the task of examining values of variables easier.
Even in this limited environment, HLL library routines are still available.
Programs that are compiled with the following combination of compilers and
compiler options can have the best performance and smallest module size, while
retaining full debugging capabilities:
v Enterprise COBOL for z/OS Version 5, with the TEST compiler option.
The following list describes the tasks that you can do when you debug optimized
COBOL programs:
v You can set breakpoints. If the optimizer moves or removes a statement, you
cannot set a breakpoint at that statement.
v You can display the value of a variable by using the LIST or LIST TITLED
commands. Debug Tool displays the correct value of the variable.
v You can step through programs one statement at a time, or run your program
until you encounter a breakpoint.
v You can use the SET AUTOMONITOR and PLAYBACK commands.
v You can modify variables in an optimized program that was compiled with one
the following compilers:
– Enterprise COBOL for z/OS, Version 4 and 5
– Enterprise COBOL for z/OS and OS/390, Version 3 Release 2 or later
– Enterprise COBOL for z/OS and OS/390, Version 3 Release 1 with APAR
PQ63235 installed
– COBOL for OS/390 & VM, Version 2 Release 2
– COBOL for OS/390 & VM, Version 2 Release 1 with APAR PQ63234 installed
However, results might be unpredictable. To obtain more predictable results,
compile your program with Enterprise COBOL for z/OS, Version 4, and specify
the EJPD suboption of the TEST compiler option. However, variables that are
declared with the VALUE clause to initialize them cannot be modified.
v If you are using Enterprise COBOL for z/OS, Version 4 and 5, and specify the
EJPD suboption of the TEST compiler option, the JUMPTO and GOTO commands are
fully enabled by the compiler for use in a debugging session.
v If you are using Enterprise COBOL for z/OS Version 4 and using OPT and the
NOHOOK or NONE, and NOEJPD suboptions of the TEST compiler option, the GOTO and
JUMPTO commands are not enabled by the compiler. In this case, there is limited
support for GOTO and JUMPTO when you run the commands with SET WARNING
OFF. However, the results of using GOTO or JUMPTO in this case might be
unpredictable and any problems encountered are not investigated by IBM
service.
v If you are using Enterprise COBOL for z/OS Version 5 and using OPT and
NOEJPD of the TEST compiler option, the GOTO and JUMPTO are still allowed but
you need to first execute the SET WARNING OFF command. However, the results of
The enhancements to the compilers help you create programs that can be
debugged in the same way that you debug programs that are not optimized, with
the following exceptions
v You cannot change the flow of your program.
v You cannot use the AT CALL entry_name command. Instead, use the AT CALL *
command.
v If the optimizer discarded a variable, you can refer to the variable only by using
the DESCRIBE ATTRIBUTES command. If you try to use any other command,
Debug Tool displays a message indicating that the variable was discarded by the
optimization techniques of the compiler.
v If you use the AT command, the following restrictions apply:
– You cannot specify a line number where all the statements have been
removed.
– You cannot specify a range of line numbers where all the statements have
been removed.
– You cannot specify a range of line numbers where the beginning point or
ending point specifies a line number where all the statements have been
removed.
The Source window does display the variables and statements that the optimizer
removed, but you cannot use any Debug Tool commands on those variables or
statements. For example, you cannot list the value of a variable removed by the
optimizer.
If your program spans more than one process, you must debug it in remote debug
mode.
If one or more of the programs you are debugging are in a shared library and you
are using dynamic debugging, you need to assign the environment variable
_BPX_PTRACE_ATTACH a value of YES. This enables Debug Tool to set hooks in the
shared libraries. Programs that have a .so suffix are programs in a shared library.
For more information about how to set environment variables, see your UNIX
System Services documentation.
To debug MVS POSIX programs in full screen mode or batch mode, the program
must run under TSO or MVS batch. If you want to run your program under the
UNIX SHELL, you must debug in full-screen mode using the Terminal Interface
Manager or remote debug mode.
To debug any MVS POSIX program that spans more than one process, you must
debug the program in remote debug mode. To customize the behavior of Debug
Tool when a new process is created by fork or exec, use the EQAOPTS
MULTIPROCESS command. For more information about EQAOPTS, see Debug Tool
Reference and Messages.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 13, “Starting Debug Tool from the Debug Tool Utilities,” on page 123
You do not have to use EQANMDBG to initiate a Debug Tool session if the initial
user program runs under control of the Language Environment, even if other parts
of the program do not run under the Language Environment.
When you use EQANMDBG to debug an assembler program that creates a COBOL
reusable runtime environment, Debug Tool is not able to debug any COBOL
programs. You can create a COBOL reusable runtime environment in one of the
following ways:
v Calling the preinitialization routine ILBOSTP0
v Calling the preinitialization routine IGZERRE
v Specifying the runtime option RTEREUS.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Chapter 16, “Starting Debug Tool for batch or TSO programs,” on page 139
z/OS Language Environment Debugging Guide
The topics below describe how Debug Tool makes it possible for you to debug
programs consisting of different languages, structures, conventions, variables, and
methods of evaluating expressions.
A general rule to remember is that Debug Tool tries to let the language itself guide
how Debug Tool works with it.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Qualifying variables and changing the point of view” on page 407
“Debugging multilanguage applications” on page 411
“Handling conditions and exceptions in Debug Tool” on page 409
Related references
“Debug Tool evaluation of HLL expressions”
“Debug Tool interpretation of HLL variables and constants” on page 406
“Debug Tool commands that resemble HLL commands” on page 406
“Coexistence with other debuggers” on page 414
“Coexistence with unsupported HLL modules” on page 414
When you enter an expression that will not be run immediately, you should fully
qualify all program variables. Qualifying the variables assures that proper context
information (such as load module and block) is passed to the language run time
when the expression is run. Otherwise, the context might not be the one you
intended when you set the breakpoint, and the language run time might not
evaluate the expression.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
“Debug Tool evaluation of C and C++ expressions” on page 327
“Debug Tool evaluation of COBOL expressions” on page 295
“Debug Tool evaluation of PL/I expressions” on page 313
HLL variables
Some variable references require language-specific evaluation, such as pointer
referencing or subscript evaluation. Once again, the Debug Tool interprets each
case in the manner of the HLL in question. Below is a list of some of the areas
where Debug Tool accepts a different form of reference depending on the current
programming language:
v Structure qualification
C and C++ and PL/I: dot (.) qualification, high-level to low-level
COBOL: IN or OF keyword, low-level to high-level
v Subscripting
C and C++: name [subscript1][subscript2]...
COBOL and PL/I: name(subscript1,subscript2,...)
v Reference modification
COBOL name(left-most-character-position: length)
HLL constants
You can use both string constants and numeric constants. Debug Tool accepts both
types of constants in C and C++, COBOL, and PL/I.
Use the SET PROGRAMMING LANGUAGE command to set the current programming
language to the desired language. The current programming language determines
how commands are parsed. If you SET PROGRAMMING LANGUAGE to AUTOMATIC, every
time the current qualification changes to a module in a different language, the
current programming language is automatically updated.
The following types of Debug Tool commands have the same syntax (or a subset of
it) as the corresponding statements (if defined) in each supported programming
language:
Assignment
These commands allow you to assign a value to a variable or reference.
In addition, Debug Tool supports special kinds of commands for some languages.
Related references
“Debug Tool commands that resemble C and C++ commands” on page 319
“Debug Tool commands that resemble COBOL statements” on page 289
You also need a way to change the Debug Tool's point of view to allow it to
reference variables it cannot currently see (that is, variables that are not within the
scope of the currently executing block or compile unit, depending upon the HLL's
concept of name scoping).
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Qualifying variables”
“Changing the point of view” on page 409
Qualifying variables
Qualification is a method you can use to specify to what procedure or load module
a particular variable belongs. You do this by prefacing the variable with the block,
compile unit, and load module (or as many of these labels as are necessary),
separating each label with a colon (or double colon following the load module
specification) and a greater-than sign (:>), as follows:
load_name::>cu_name:>block_name:>object
This procedure, known as explicit qualification, lets Debug Tool know precisely
where the variable is.
If required, cu_name is the compile unit name. The cu_name is required only when
you want to change the qualification to other than the currently qualified compile
unit. cu_name can be the Debug Tool variable %CU.
If required, block_name is the program block name. The block_name is required only
when you want to change the qualification to other than the currently qualified
block. block_name can be the Debug Tool variable %BLOCK.
is valid.
LM::>PROC1:>PROC1:>variable
is not valid.
You do not have to preface variables in the currently executing compile unit. These
are already known to Debug Tool; in other words, they are implicitly qualified.
In order for attempts at qualifying a variable to work, each block must have a
name. Blocks that have not received a name are named by Debug Tool, using the
form: %BLOCKnnn, where nnn is a number that relates to the position of the block in
the program. To find out the Debug Tool's name for the current block, use the
DESCRIBE PROGRAMS command.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Each time you update any of the three Debug Tool variables %CU, %PROGRAM, or
%BLOCK, all four variables (%CU, %PROGRAM, %LOAD, and %BLOCK) are automatically
updated to reflect the new point of view. If you change %LOAD using SET QUALIFY
LOAD, only %LOAD is updated to the new point of view. The other three Debug Tool
variables remain unchanged. For example, suppose your program is currently
suspended at loadx::>cux:>blockx. Also, the load module loadz, containing the
compile unit cuz and the block blockz, is known to Debug Tool. The settings
currently in effect are:
%LOAD = loadx
%CU = cux
%PROGRAM = cux
%BLOCK = blockx
If you enter any of the following commands:
SET QUALIFY BLOCK blockz;
If you are debugging a program that has multiple enclaves, SET QUALIFY can be
used to identify references and statement numbers in any enclave by resetting the
point of view to a new block, compile unit, or load module.
Related tasks
Chapter 45, “Debugging across multiple processes and enclaves,” on page 417
“Changing the point of view in C and C++” on page 336
“Changing the point of view in COBOL” on page 299
When a condition is signaled in your application, Debug Tool prompts you and
you can then dynamically code around the problem. For example, you can initialize
a pointer, allocate memory, or change the course of the program with the GOTO
command. You can also indicate to Language Environment's condition handler,
that you have handled the condition by issuing a GO BYPASS command. Be aware
When debugging with Debug Tool, you can (depending on your host system)
either instruct the debugger to handle program exceptions and conditions, or pass
them on to your own exception handler. Programs also have access to Language
Environment services to deal with program exceptions and conditions.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Handling conditions in Debug Tool”
“Handling exceptions within expressions (C and C++ and PL/I only)” on page
411
If you specify TEST(ALL) as a run-time option when you begin your debug session,
Debug Tool gains control at the occurrence of most conditions.
Note: Debug Tool recognizes all Language Environment conditions that are
detected by the Language Environment error handling facility.
You can also direct Debug Tool to respond to the occurrence of conditions by using
the AT OCCURRENCE command to define breakpoints. These breakpoints halt
processing of your program when a condition is raised, after which Debug Tool is
given control. It then processes the commands you specified when you defined the
breakpoints.
There are several ways a condition can occur, and several ways it can be handled.
If, after the execution of any defined breakpoint, control returns to your program
with a GO, the condition is raised again in the program (if possible and still
applicable). If you use a GOTO to bypass the failing statement, you also bypass your
program's error handling facilities.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
“Language Environment conditions and their C and C++ equivalents” on page
326
“PL/I conditions and condition handling” on page 309
z/OS Language Environment Programming Guide
Enterprise COBOL for z/OS Language Reference
However, you might want to pass an exception to your program, perhaps to test
an error recovery procedure. In this case, use SET WARNING OFF.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Using SET WARNING PL/I command with built-in functions” on page 316
When the need to debug a multilanguage application arises, you can find yourself
facing one of the following scenarios:
v You need to debug an application written in more than one language, where
each language is supported by Language Environment and can be debugged by
Debug Tool.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Debugging an application fully supported by Language Environment”
“Using session variables across different programming languages”
When defining session variables you want to access from compile units of different
languages, you must define them with compatible attributes.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Using session variables across different programming languages”
Related references
z/OS Language Environment Programming Guide
Note: When registering session variables in PL/I, the DECIMAL type is always the
default. For example, if C declares a float, PL/I registers the variable as a FLOAT
DEC(6) rather than a FLOAT BIN(21).
When declaring session variables, remember that C and C++ variable names are
case-sensitive. When the current programming language is C and C++, only
session variables that are declared with uppercase names can be shared with
COBOL or PL/I. When the current programming language is COBOL or PL/I,
session variable names in mixed or lowercase are mapped to uppercase. These
COBOL or PL/I session variables can be declared or referenced using any mixture
of lowercase and uppercase characters and it makes no difference. However, if the
session variable is shared with C and C++, within C and C++, it can only be
referred to with all uppercase characters (since a variable name composed of the
same characters, but with one or more characters in lowercase, is a different
variable name in C and C++).
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
“Debug Tool interpretation of HLL variables and constants” on page 406
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
“Coexistence with unsupported HLL modules”
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
“Coexistence with other debuggers”
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
z/OS Language Environment Programming Guide
In full-screen mode or batch mode, you can debug a non-POSIX program that
spans more than one process, but Debug Tool can be active in only one process. In
remote debug mode, you can debug a POSIX program that spans more than one
process. The remote debugger can display each process.
When you are recording the statements that you run, data collection persists across
multiple enclaves until you stop recording. When you replay your statements, the
data is replayed across the enclave boundaries in the same order as they were
recorded.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Starting Debug Tool within an enclave”
“Viewing Debug Tool windows across multiple enclaves”
“Ending a Debug Tool session within multiple enclaves” on page 418
“Using Debug Tool commands within multiple enclaves” on page 418
If Debug Tool is first activated in a nested enclave of a process, and you step or go
back to the parent enclave, you can debug the parent enclave. However, if the
parent enclave contains COBOL but the nested enclave does not, Debug Tool is not
active for the parent enclave, even upon return from the child enclave.
Upon activation of Debug Tool, the initial commands string, primary commands
file, and the preferences file are run. They run only once, and affect the entire
Debug Tool session. A new primary commands file cannot be started for a new
enclave.
If you have not used these breakpoint types, you can specify NOPROMPT.
In a single enclave, QUIT closes Debug Tool. For CICS non-Language Environment
programs (assembler or non-Language Environment COBOL), QUIT closes Debug
Tool and the task ends with an ABEND 4038, regardless of the link level.
Normally, the condition causes the current enclave to terminate. Then, the same
condition will be raised in the parent enclave, which will also terminate. This
sequence continues until all enclaves in the process have been terminated. As a
result, you will see a CEE2529S message for each enclave that is terminated.
For CICS and MVS only: Depending on Language Environment run-time settings,
the application might be terminated with an ABEND 4038. This termination is
normal and should be expected.
Affects entire
Affects current Debug Tool
Debug Tool command enclave only session Comments
%CAAADDRESS X
AT GLOBAL X
AT TERMINATION X
code coverageSTART X
code coverageSTOP X
CLEAR AT X X In addition to clearing breakpoints set in the
current enclave, CLEAR AT can clear global
breakpoints.
CLEAR DECLARE X
CLEAR LDD X
CLEAR VARIABLES X
Note:
1. SET commands other than those listed in this table affect the entire Debug Tool
session.
After you finish debugging your Java native method and the programs called by
the Java native method, remove the modifications done in these steps before
moving your application to a production environment.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
“Starting Debug Tool with CEETEST” on page 127
Related references
Language Environment Vendor Interfaces
When Debug Tool attempts to debug a program loaded from LLA, Debug Tool
does the following steps:
v Debug Tool checks for the allocation of DD name EQALOAD and checks that it
contains a member name that matches the program that LLA loaded.
v If Debug Tool does not find a program by the specified name in EQALOAD,
Debug Tool checks for the allocation of DD name STEPLIB and checks that it
contains a member name that matches the program that LLA loaded.
v If Debug Tool does find a program by the specified name in one of the previous
steps and the length of this program matches the length of the program in
memory, Debug Tool passes the data set name from the corresponding DD
statement to the binder APIs to use it to obtain the information.
Debug Tool does not try to debug load modules or compile units that have these
prefixes for the following reasons:
v Debug Tool might perform improper recursions that might result in abnormally
endings (ABENDs) or other erroneous behavior.
If you have named a user load module or compile unit with a prefix that conflicts
with one of these system prefixes, you can use the NAMES INCLUDE command and
the instructions described in this section to debug this load module or compile
unit.
These commands display a list of names currently excluded at your request (by
using the NAMES EXCLUDE command), followed by a section displaying a list of
names excluded by Debug Tool.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
NAMES command in Debug Tool Reference and Messages
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
"NAMES command" in Debug Tool Reference and Messages
In these situations, you can use the NAMES EXCLUDE command to indicate to Debug
Tool that these are data-only modules that contain no executable code. Debug Tool
will not attempt to set breakpoints in these data-only modules. If the NAMES
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
"NAMES command" in Debug Tool Reference and Messages
You enable explicit debug mode by entering the SET EXPLICITDEBUG ON command
or by specifying the EQAOPTS EXPLICITDEBUG command. By default, this mode is
OFF. In explicit debug mode, (except for cases described below) you must use the
LOADDEBUGDATA (LDD) command to cause Debug Tool to load the debug data for the
compile units that you want to debug.
In most cases, you can use the SET EXPLICTDEBUG command to enable explicit
debug mode; however, in some cases you might need to use the EQAOPTS
EXPLICITDEBUG command. Because Debug Tool does not process commands until
after it processes the initial load module and all the compile units it contains, if
you want Debug Tool to not load debug data for compile units in the initial load
module, use the EQAOPTS EXPLICITDEBUG command.
When explicit debug mode is active, Debug Tool loads debug data in only the
following cases:
v For the compile unit where Debug Tool first became active and the first compile
unit in each enclave. In most cases, this is the entry compile unit for the initial
load module.
Debug Tool does not support the SET DISASSEMBLY ON command in explicit debug
mode. When explicit debug mode is active, Debug Tool forces SET DISASSEMBLY
OFF and you will not be able to set it back to ON while in explicit debug mode.
You can use the NAMES EXCLUDE command to indicate to Debug Tool that it does not
need to maintain debug data for these modules. When you use the NAMES EXCLUDE
command to exclude executable modules, there are situations where Debug Tool
requires debug data for the excluded modules. The following list, while not
comprehensive, describes some of the possible situations:
v The entry point of an enclave.
v The next higher-level compile unit when a STEP RETURN command is executing.
v Compile units that appear in the call chain of a compile unit where Debug Tool
has suspended execution.
v The next higher-level compile unit when the user-program has been suspended
at an AT EXIT breakpoint.
Also, when you enter a deferred AT ENTRY command, Debug Tool generates an
implicit NAMES INCLUDE command for the load module and compile unit that is
the target of the deferred AT ENTRY. If these names appear later in the program,
Debug Tool will not exclude them even if you specified them in a previous
NAMES EXCLUDE command.
In all of the above situations, Debug Tool loads debug data as required and these
modules might become known to Debug Tool.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
"NAMES command" in Debug Tool Reference and Messages
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
"NAMES command" in Debug Tool Reference and Messages
Currently, you enter AT ENTRY prog1 and GO commands when the debug session
starts.
However, in some complex applications, it can take some significant time before
prog1 appears. In this case, you can use delay debug mode to delay the starting of
the debug session until Debug Tool recognizes prog1.
Debug Tool is in the dormant state during the delay debug mode and monitors
only a few events. When Debug Tool recognizes prog1, Debug Tool comes out of
delay debug mode, completes the initialization, and starts the debug session.
Delay debug mode uses a delay debug profile data set that contains the program
list and TEST runtime option. This profile is used by Debug Tool to match the
program name or C function name (compile unit) (and optionally a load module
name) with the names in the program list. If there is a match, Debug Tool comes
out of the delay debug mode and uses the TEST runtime to complete the
You enable delay debug mode by using the EQAOPTS DLAYDBG command. By
default, delay debug mode is NO. When delay debug mode is enabled, you can
specify these additional commands:
DLAYDBGCND
You can use this command to indicate whether you want Debug Tool to
monitor condition events in the delay debug mode.
The default is DLAYDBGCND,ALL.
DLAYDBGDSN
Delay debug profile data set naming pattern.
The default is userid.DLAYDBG.EQAUOPTS.
DLAYDBGTRC
Delay debug pattern match trace message level.
This message level is used to generate error and informational messages
for debugging purposes.
The default is 0, which indicates no trace messages.
DLAYDBGXRF
You can use this command to indicate that you want Debug Tool to use the
cross reference file or the Terminal Interface Manager repository to find the
user ID when it constructs the delay debug profile data set name.
This command can be used in the IMS environment when an IMS
transaction is started with a generic ID. With the RESPOSITORY option,
the command can also be used in the DB/2 stored procedures environment
when a stored procedure runs under a generic ID.
See “Debugging tasks running under a generic user ID by using Terminal
Interface Manager” on page 434 for a description of the steps required to
use the REPOSITORY option of DLAYDBGXRF
Once Debug Tool completes the initialization, the delay debug mode cannot be
reactivated.
Usage notes
v The delay debug mode applys to non-CICS environments only.
v The delay debug mode applies to programs compiled with the Enterprise
COBOL for z/OS and Enterprise PL/I for z/OS compilers, C functions compiled
with the z/OS V2.1 XL C/C++ compiler and non-Language Environment
programs. Non-Language Environment compile units must be the initial
program in a task or the target of a LINK or LINKX macro to be eligible for
delay debug pattern matching.
For compile time and run time requirements of C functions, see “Delay debug
mode for C requires the FUNCEVENT(ENTRYCALL) compiler suboption” on
page 43.
v The main program of the application must be a Language Environment
program, or a non-Language Environment program that is started by using
EQANMDBG.
Refer to the following topics for more information related to the material discussed
in this topic.
Related references
Usage notes:
v Each task to be debugged in an address space uses an entirely separate copy of
Debug Tool. Therefore, commands such as LIST CALLS provide information only
about the current task. Debug Tool does not provide information about any tasks
that precede the current task in the parent chain.
v For remote debug users, each task is displayed in the Debug view as a separate
"Incoming debug session".
v 3270 users can log on to the Terminal Interface Manager on multiple terminals
using the same user ID. For each task to be debugged, a Debug Tool session
starts on an available terminal if the following conditions are met:
– The user chose full-screen mode using the Terminal Interface Manager in the
delay debug profile.
– The terminal that the user logged on is available, and is not in a Debug Tool
session.
Note: For the setup items, you may need to confer with your system programmer
to ensure that the steps have been performed.
To debug a task stared by a generic user ID, take the following steps:
1. Make a connection to the Terminal Interface Manager.
2. Log on to Terminal Interface Manager with your TSO user ID and password.
The following panel is displayed:
DEBUG TOOL TERMINAL INTERFACE MANAGER
3. Press PF10 to edit your LE options data set. Ensure that you select the delay
debug options data set. The default name for this data set is
userid.DLAYDBG.EQAUOPTS, but it might have been customized for your site
to use a different naming pattern.
4. On the Edit TEST runtime options data set panel, press PF8 to access the
DB2/IMS information panel. Fill in the proper information for the IMS
transaction or the DB/2 stored procedure that you want to debug. The
following example shows how to debug IMS transaction "DTMQBR" defined in
IMS system "IMS1":
5. Press PF4 to save the IMS or DB/2 information, and then press PF4 again to
save the delay debug preferences.
6. When you no longer want to debug the given task, you can deregister for the
task by using Terminal Interface Manager to edit the delay debug preferences
data set and remove the task information from the IMS/DB2 options panel. You
can also log off of Terminal Interface Manager.
Note: When the IMS transaction or DB/2 stored procedure executes under a
generic user ID in delay debug mode, Debug Tool communicates with Terminal
Interface Manager to determine whether a user has signed on and wants to debug
the current task.
If the IMS or DB/2 information matches, the TIM user's TSO user ID is returned to
Debug Tool. Debug Tool uses the TSO user ID to open the associated delay debug
preferences data set. If the pattern-matching arguments in the delay debug
preferences data set match, the debug preference will be used to start the Debug
Tool user interface.
10. In situations where you can specify environment variables, you can set the environment variable EQA_USE_MDBG to YES or
NO, which overrides any setting (including the default setting) of the EQAOPTS MDBG command.
In all of these cases, there is a default data set name associated with each CU, load
module, or DLL. The way this default name is generated differs depending on the
source language and compiler used. To learn how each compiler generates the
default name, see the compiler's programming guide or user's guide.
Debug Tool obtains the source or listing data, separate debug file data, or
EQALANGX data from one of the following sources:
v the default data set name
v the SET SOURCE command
v the SET DEFAULT LISTINGS command
11. In situations where you can specify environment variables, you can set the environment variable EQA_USE_MDBG to YES or
NO, which overrides any setting (including the default setting) of the EQAOPTS MDBG command.
12. In situations where you can specify environment variables, you can set the environment variable EQA_USE_MDBG to YES or
NO, which overrides any setting (including the default setting) of the EQAOPTS MDBG command.
For C and C++ CUs, Debug Tool obtains the source data and separate debug file
data from different sources, depending on how you created the CU and what value
you specified for the EQAOPTS MDBG command.13 For CUs created and debugged
under the following conditions, Debug Tool obtains the source data from the
source file and separate debug file data from the .dbg file:
v Compiled with the FORMAT(DWARF) suboption of the DEBUG compiler option
v Specified NO for the EQAOPTS MDBG command14
Debug Tool obtains the source file from one of the following sources:
v the default data set name
v the SET SOURCE command
v the SET DEFAULT LISTINGS command
v the EQAUEDAT user exit (specifying function code 3)
v The EQADEBUG DD name
v the EQA_SRC_PATH environment variable
Debug Tool obtains the .dbg file from one of the following sources:
v the default data set name
v the SET DEFAULT DBG command
v the EQAUEDAT user exit (specifying function code 35)
v the EQADBG DD name
v the EQA_DBG_PATH environment variable
Note that these lists do show only what can be processed, not the processing order.
For C and C++ CUs created and debugged under the following conditions, Debug
Tool obtains the source data and separate debug file data from the .mdbg file:
v Compiled with the FORMAT(DWARF) suboption of the DEBUG compiler option
v Compiled with z/OS XL C/C++, Version 1.10 or later
v Created an .mdbg file with saved (captured) source for the load module or DLL
by using the -c option of the dbgld command or CAPSRC option of the
CDADBGLD utility.
v Specified YES for the EQAOPTS MDBG command (which requires Debug Tool to
search for a .dbg file in a .mdbg file)15
Debug Tool obtains the .mdbg file from one of the following sources:
v the default data set name
v the SET MDBG command
v the SET DEFAULT MDBG command
v the EQAUEDAT user exit (specifying function code 37)
v the EQAMDBG DD statement
v the EQA_MDBG_PATH environment variable
13. In situations where you can specify environment variables, you can set the environment variable EQA_USE_MDBG to YES or
NO, which overrides any setting (including the default setting) of the EQAOPTS MDBG command.
14. In situations where you can specify environment variables, you can set the environment variable EQA_USE_MDBG to YES or
NO, which overrides any setting (including the default setting) of the EQAOPTS MDBG command.
15. In situations where you can specify environment variables, you can set the environment variable EQA_USE_MDBG to YES or
NO, which overrides any setting (including the default setting) of the EQAOPTS MDBG command.
If you are using the EQAUEDAT user exit in your environment, the name
provided in the user exit takes precedence if Debug Tool finds that file.
For .dbg and .mdbg files, Debug Tool does not search for the source until it finds a
valid .dbg or .mdbg file.
How does Debug Tool locate COBOL and PL/I separate debug file
files?
Debug Tool might read from a Enterprise COBOL for z/OS Version 4 compiler
(and earlier) or PL/I separate debug file more than once but it always reads the
separate debug file from the same data set. After Debug Tool locates a valid
separate debug file, you cannot direct Debug Tool to a different separate debug
file. When the CU first appears, Debug Tool looks for the separate debug file in the
following order:
1. SET SOURCE command
2. default data set name. If a data set with the default data set name cannot be
located, and if the EQAUEDAT user exit is implemented and a EQADEBUG
DD statement is not specified, the data set name might be modified by the
EQAUEDAT user exit.
3. SET DEFAULT LISTINGS command. If the EQAUEDAT user exit is implemented
and a EQADEBUG DD statement is not specified, the data set name might be
modified by the EQAUEDAT user exit.
4. if present, the EQADEBUG DD statement
The Enterprise COBOL for z/OS Version 5 compiler does not create a separate
debug file and the commands in this section do not apply.
The SET SOURCE command can be entered only after the CU name appears as a CU
and the separate debug file is not found in any of the other locations. The SET
DEFAULT LISTINGS command can be entered at any time before the CU name
appears as a CU or, if the separate debug file is not found in any of the other
possible locations, it can be entered later.
Appendix B. How does Debug Tool locate source, listing, or separate debug files? 447
How does Debug Tool locate EQALANGX files
An EQALANGX file, which contains debug information for an assembler or LangX
COBOL program, might be read more than once but it is always read from the
same data set. After Debug Tool locates a valid EQALANGX file, you cannot direct
Debug Tool to a different EQALANGX file. After you enter the LOADDEBUGDATA (LDD)
command (which is run immediately or run when the specified CU becomes
known to Debug Tool), Debug Tool looks for the EQALANGX file in the following
order:
1. SET SOURCE command
2. a previously loaded EQALANGX file that contains a CSECT that matches the
name and length of the program
3. default data set name. If a data set with the default data set name cannot be
located, and if the EQAUEDAT user exit is implemented and a EQADEBUG
DD statement is not specified, the data set name might be modified by the
EQAUEDAT user exit.
4. SET DEFAULT LISTINGS command. If the EQAUEDAT user exit is implemented
and a EQADEBUG DD statement is not specified, the data set name might be
modified by the EQAUEDAT user exit.
5. the EQADEBUG DD statement
The SET SOURCE command can be entered during any of the following situations:
v Any time after the CU name appears as a disassembly CU.
v If the CU is known when the LDD command is entered but then Debug Tool does
not find the EQALANGX file.
v If the CU is not known to Debug Tool when the LDD command is entered and
then Debug Tool runs the LDD after the CU becomes known to Debug Tool.
The SET DEFAULT LISTINGS command can be entered any time before you enter the
LDD command or, if the EQALANGX file is not found by the LDD command, after
you enter the LDD command.
How does Debug Tool locate the C/C++ source file and the .dbg file?
If you compile with the FORMAT(DWARF) and FILE suboptions of the DEBUG compiler
option and specify NO for the EQAOPTS MDBG command16, Debug Tool needs the
source file and the .dbg file. The following list describes how Debug Tool searches
for those files:
v Debug Tool reads the source files for a CU each time it needs to display the
source code. Debug Tool searches for the source file by using the name the
compiler saved in the load module or DLL. If you move the source files to a
different location, Debug Tool searches for the source file based on the input
from the following commands, user exit, or environment variable, in the
following order:
1. In full screen mode, the SET SOURCE command.
2. In remote debug mode, the EQA_SRC_PATH environment variable or what
you enter in the Change Text File action from the editor view.
3. The EQADEBUG DD statement.
16. In situations where you can specify environment variables, you can set the environment variable EQA_USE_MDBG to YES or
NO, which overrides any setting (including the default setting) of the EQAOPTS MDBG command.
To learn more about the DEBUG compiler option, the dbgld command, and the
CDADBGLD utility, see z/OS XL C/C++ User's Guide.
Debug Tool might read the .mdbg file more than once, but it always reads this file
from the same data set. After Debug Tool locates this file and validates its contents
with the load module being debugged, you cannot redirect Debug Tool to search a
different file. Debug Tool searches for the .mdbg file based on the input from the
following commands, user exit, or environment variable, in the following order:
1. The EQAUEDAT user exit, specifying function code 37.
2. If you do not write the EQAUEDAT user exit or the user exit cannot find the
file, the default data set name, which is
userid.mdbg(load_module_or_DLL_name), or, in UNIX System Services,
./load_module_or_DLL_name.mdbg.
Appendix B. How does Debug Tool locate source, listing, or separate debug files? 449
If Debug Tool cannot find the .mdbg file, then it searches for the .mdbg file based
on the input from the following commands, DD statement, or environment
variable, in the following order:
1. The SET MDBG command
2. The SET DEFAULT MDBG command
3. The EQAMDBG DD statement.
4. The EQA_MDBG_PATH environment variable.
To learn more about the DEBUG compiler option, the dbgld command, and the
CDADBGLD utility, see z/OS XL C/C++ User's Guide.
Copy the following members of the hlq.SEQASAMP data set into the personal data
sets you just created:
Appendix C. Examples: Preparing programs and modifying setup files with Debug Tool Utilities 453
12. One of the following panels is displayed, depending on the language you
selected in step 2:
v EQAPPC1C for COBOL programs.
v EQAPPC3C for PL/I programs.
v EQAPPC4C for C and C++ programs.
v EQAPPC5C for assembler programs.
Press PF3 (Exit).
13. One of the following panels is displayed, depending on the language you
selected in step 2:
v EQAPPC1B for COBOL programs.
v EQAPPC3B for PL/I programs.
v EQAPPC4B for C and C++ programs.
v EQAPPC5B for assembler programs.
Press PF3 (Exit).
14. One of the following panels is displayed, depending on the language you
selected in step 2:
v EQAPPC1 for COBOL programs.
v EQAPPC3 for PL/I programs.
v EQAPPC4 for C and C++ programs.
v EQAPPC5 for assembler programs.
Press PF3 (Exit).
15. In panel EQAPP, press PF3 (Exit) to return to EQA@PRIM panel.
Appendix C. Examples: Preparing programs and modifying setup files with Debug Tool Utilities 455
Run the program in batch
To modify and run the setup file so that the program runs in batch, do the
following steps:
1. In panel EQA@PRIM, select 0. Press Enter.
2. In panel EQAPDEF, review the job card information. If there are any changes
that need to be made, make them. Press PF3 (Exit).
3. In panel EQA@PRIM, select 2. Press Enter.
4. In panel EQAPFOR, select one of the following choices, depending on which
language you selected in step 2 in topic “Compiling or assembling your
program by using Debug Tool Utilities” on page 452:
v For the COBOL program, use the following values for each field: Project =
prefix, Group = SAMPLE, Type = DTSF, Member =WSU1
v For the PL/I program, use the following values for each field: Project =
prefix, Group = SAMPLE, Type = DTSF, Member =WSU3
v For the C program, use the following values for each field: Project = prefix,
Group = SAMPLE, Type = DTSF, Member = WSU4
v For the assembler program, use the following values for each field: Project
= prefix, Group = SAMPLE, Type = DTSF, Member = WSU5
Press Enter.
5. If you ran the steps beginning in step 1 of topic “Run the program in
foreground” on page 455 you can skip this step. In panel EQAPFORS, do the
following steps:
a. Replace &LOADDS. with the name of the load data set from step 5 in topic
“Compiling or assembling your program by using Debug Tool Utilities” on
page 452.
b. Replace &EQAPRFX. with the prefix your EQAW (Debug Tool) library.
c. Replace &CEEPRFX. with the prefix your CEE (Language Environment)
library.
6. Enter "e" in the Cmd field next to CMDS DD name. If there is not ’QUIT ;’
statement at the end of the data set, then add the statement. Press PF3 (Exit).
7. Type submit in command line. Press Enter.
8. In panel ISREDDE2, type submit in the command line. Press Enter. Make a
note of the job number that is displayed.
9. In panel ISREDDE2, press PF3 (Exit).
10. In panel EQAPFORS, press PF3 (Exit). The changes you made to the setup file
are saved.
11. In panel EQAPFOR, press PF3 (Exit) to return to EQA@PRIM panel. locate the
job output using the job number recorded. Check for zero return code and the
command log output at the end of the job output.
| By using the Debug Tool JCL Wizard, you can build control statements to complete
| following tasks:
| v Invoke Debug Tool, accessing the Terminal Interface Manager, Dedicated
| Terminal, or Remote GUI.
| v Invoke Debug Tool for Language Environment (LE) or non-Language
| Environment (non-LE) programs.
| v Include a request to invoke the Automonitor.
| v Include a request to set AT ENTRY breakpoints.
| v Include a request to SET WARN OFF or ON.
| v Define the libraries to search for Debug Tool source and debug information.
| Note: If the program name or CSECT name for assembler is not the member
| name of the debug file, the wizard presents a list of members for each debug
| file, and then users can select the corresponding member name.
| v Provide a panel to enter the programs which require LDD statements.
| v Request Code Coverage invocation with or without an interactive Debug
| session.
| v Request a Delayed Debug session.
| v Remove Debug Tool statements.
| v Show comments depicting how to access subprogram source and debug
| information before being loaded into storage.
| The user identifies the location of the statements by using an A (after) or B (before)
| line command. If no line command is supplied and more than one program was
| identified in the JCL or procedure member, the wizard lists all programs. You can
| select the program that you want to debug from the list. If you want to provide an
| override value of procedure step, specify an A or B line command.
| The Debug Tool JCL Wizard can create in-stream data. Therefore, it works with a
| procedure member for JES2 under z/OS 1.13 or later, and with JES3 under z/OS
| 2.1 or later. If you do not run Debug Tool JCL Wizard in one of the environments
| that are described above, submitting JCL invoking procedures with in-stream
| control statements fails.
| Help information
| To see the help information, complete the following steps:
| 1. You can edit or view JCL, a JCL procedure, or an include member in ISPF to
| invoke Debug Tool JCL Wizard. Your installer can customize your environment
| to use another name rather than EQAJCL, such as DEBUG. In this use case, the
| name EQAJCL is used to invoke the Debug Tool JCL Wizard.
|
|
|
| 2. The Debug Tool JCL Wizard Option Selection panel is displayed as follows. To
| see the Getting Started help panel, select PF1 from this panel.
|
|
|
| 3. To invoke Debug Tool, the Debug Tool JCL Wizard needs to create the
| necessary JCL statements. The following options are provided:
|
|
| 4. You can invoke the Debug Tool JCL Wizard when you view or edit a JCL
| member, a procedure member, or an include member. Debug Tool JCL Wizard
| can create instream JCL statements. For procedures or included members,
| instream JCL statements such as //SYSIN DD * are valid only when you use
| JES2 systems with z/OS V1.R13 or later, or JES3 systems with z/OS V2.1.0 or
| later.
|
|
|
| 5. To choose where new JCL lines are placed, use an A or B line command. If the
| A or B line commands are not used, a list of job steps is displayed for your
| selection.
| Note: The Debug Tool JCL Wizard does not create the JCL for all scenarios. For
| example, if you want to debug multiple job steps in a JCL member, you can
| create the JCL for the first Debug Tool invocation by using the Debug Tool JCL
| Wizard. However, you need to manually code the JCL to invoke Debug Tool for
|
| Debug a Language Environment program by using the
| Terminal Interface Manager
| To debug a Language Environment program by using the Debug Tool JCL wizard,
| you can use the Terminal Interface Manager. To do the job, complete the following
| steps:
| 1. In the following panel, the program name is a symbolic name that is defined
| by a SET statement. The Debug Tool JCL Wizard can process symbolic
| program names correctly. To invoke the Debug Tool JCL Wizard Options
| panel, type EQAJCL.
|
|
|
| 2. Select the Terminal Interface Manager option from the following panel.
|
|
| 3. All fields have field help available. To view the field help that is associated
| with the LE Program field, place the cursor in the LE Program field and press
| PF1.
|
|
|
| 4. Enter YES if the program invoked by the "EXEC PGM=" statement is
| Language Environment enabled. Enter NO if the program is not Language
| Environment enabled. If the LE Program field is set incorrectly, Debug Tool is
| not invoked.
|
|
| 5. Type YES in the LE Program field if the program is a Language Environment
| enabled program. If you want to set breakpoints at subprograms using the AT
| ENTRY command, and request the Automonitor, specify a forward slash (/)
| for At Entry and Automonitor on.
|
|
|
| 6. After you choose to set AT ENTRY breakpoints for subprograms, the
| following panel is displayed. If you are saving your settings or using the
| remote debugger, AT ENTRY breakpoints are remembered between debug
| sessions. To clear previous AT ENTRY Breakpoints before setting these
| breakpoints, enter the forward slash (/) in the Clear Previous AT ENTRY
| Breakpoints line.
|
| 7. If more than one EXEC PGM statement is found in the JCL or procedure, and
| you did not specify the A or B line command, a list of job steps is displayed.
| Choose the program you want to debug. You can choose only one step.
|
|
|
| 8. Debug Tool JCL Wizard has generated the appropriate statements to invoke
| Debug Tool. The first and last generated lines are comment lines. Do not
| modify these comment lines. The //CEEOPTS statement defines the
| EQACMD command file DD name, and the VTAM% userid information to
| invoke the Terminal Interface Manager.
|
| 9. To remove the statements that are previously generated by the Debug Tool
| JCL Wizard, use the EQAJCL R command. The first and last lines generated
| are comment lines. If you modify the comment lines, the statements that are
| generated by the Debug Tool JCL Wizard cannot be removed properly.
|
|
|
| Debug a Language Environment program with the Remote GUI
| by using the A line command with a Procedure Step Override
| You can use the remote debugger, or GUI to debug Enterprise COBOL, COBOL for
| MVS and VM, Enterprise PL/I, later versions of C/C++ and assembler. To invoke
| the Debug Tool remote debugger with a line command to indicate where the JCL is
| placed, complete the following steps:
| 1. In the following panel, issue the EQAJCL G command to bypass the options
| screen, and request a debug session with remote debugger. Then, place the
| generated statements after the line that contains the TESTSAM1 EXEC
| statement at line 5.
|
|
|
| 2. Then, you need your IP Address from your workstation. To locate this IP
| address, start the remote debugger, and open the DEBUG perspective. Note
Appendix D. Debug Tool JCL Wizard 465
| your port number. It is generally 8001.
|
|
|
| 3. Paste your IP address into the IP address field. Enter the port number that is
| provided by the remote debugger. You can optionally choose to add AT ENTRY
| breakpoints, set the Automonitor on, and show comments on how to display
| subprograms before invocation.
|
|
|
| 4. The subprograms SAM2 and SAM3 are dynamically called. The load module
| name of SAM2 and SAM3 is named SAM2 and SAM3 respectively. Therefore,
| only the program name is required.
|
|
| 5. In this use case, the JCL points to a procedure. If you choose the A line
| command, you can enter the Procedure Step Override. In this use case,
| RUNSAM1 is entered for this value.
|
|
|
| 6. The procedure TESTSAM1 contains a step RUNSAM1, which invokes the
| SAM1 program. Use the Procedure Step Override to define the EQACMD DD
| (and its contents) for the RUNSAM1 STEP.
| The CEEOPTS DD Statement is generated with the parameter TCPIP, indicating
| you want to debug using the remote debugger with the appropriate IP address
| and port number. The Automonitor is turned on, AT ENTRY breakpoints are
| set, and instructions provided on how to view subroutines before invocation.
| To start this session, start the remote debugger, and submit the job. If the
| remote debugger does not depict the initiation of a debug session, verify the
| job is not waiting for an initiator, or failed with a JCL error.
|
|
| Debug a non-Language Environment program by using the
| Terminal Interface Manager
| You can use the Debug Tool JCL Wizard to invoke non-Language Environment
| programs. If you do not plan to test non-Language Environment programs, skip
| this use case.
|
| 2. If you want to debug a non-Language Environment assembler program, enter
| NO in the LE Program field.
| For non-Language Environment programs, to identify where the side file
| information is located, you need debug libraries. You also need a Load Debug
|
| 3. The program name must be explicitly identified for non-Language Environment
| programs. Enter the name of the non-Language Environment program you
| want to debug. That name is the name shown on the EXEC PGM= statement.
|
|
|
| 4. In the following panel, you can identify up to six Debug Tool side file data sets.
| These side files are created during the compilation or assembly process. You
| can add libraries of various types in this panel. For example, some languages
| use a LANGX file, others use SYSDEBUG or listing data sets. If you require
| more than six libraries, modify the JCL after the Debug Tool JCL Wizard creates
| the appropriate statements.
|
|
| 5. Enter the program names and subprogram names that are being debugged.
| These names are used for setting AT ENTRY breakpoints. Use this panel to
| identify the non-Language Environment programs before you invoke the
| Debug tool for the debugging session.
|
|
|
| 6. When you set breakpoints, generally only the program name is required.
| However, if the load module name is different from the program name, enter
| the load module name next to the program name. In this use case, the ASAM2
| program load module name is ASAM2L.
|
|
| 7. The JCL to invoke Debug Tool is generated. Note that the program name on
| line 3 was changed from ASAM1 to EQANMDBG. This program will initiate
| the debug session, debugging ASAM1, the first program to be invoked. The
| VTAM%DNET424 requests Debug Tool to invoke the Terminal Interface
| Manager. This information is passed to the EQANMDBG program via the
| EQANMDBG DD statement.
| LDD statements are generated for the programs ASAM1, ASAM2, and ASAM3.
| Breakpoints are set for ASAM2, and ASAM3, using the load modules ASAM2L
| and ASAM3L respectively.
| The EQADEBUG DD statement defines the side files, where the program
| source and debug data can be found.
|
|
|
| 8. To remove the Debug Tool JCL statements, enter EQAJCL R.
|
|
| 9. Note that the PGM=EQANMDBG statement has been modified back to the
| original program name, ASAM1.
|
|
|
| Debug a Language Environment DB2 program by using the
| Remote GUI
| You can generate the Debug Tool JCL statements to debug a DB2 batch program by
| using the remote GUI. To do the job, complete the following steps:
| 1. Enter EQAJCL G to create the required statements.
|
|
| 2. The program is a Language Environment program, therefore, type YES to the
| LE Program field. The Automonitor is not needed for the remote debugger
| when debugging Enterprise COBOL or PL/I programs. You can monitor
| variables by right-clicking the variables pane, and requesting filter locals, then
| select Automonitor current or Automonitor Previous.
|
|
|
| 3. The JCL statements were generated for the batch DB2 program. This process is
| identical to a non-DB2 program invocation.
|
|
| Debug a non-Language Environment DB2 program by using
| the Remote GUI
| You can create the JCL to start a debug tool session for a non-Language
| Environment DB2 batch program. To do the job, complete the following steps:
| 1. Request to debug the non-Language Environment DB2 program on the GUI.
|
|
|
| 2. Set the Language Environment Program option to NO if the DB2 program is
| non-Language Environment, and request the Debug Tool debug libraries, the
| LDD statements, and the Automonitor.
|
|
| 3. Enter the name of the non-Language Environment program, TRADERD.
|
|
|
| 4. Enter one or more debug libraries that are associated with the TRADERD
| program and subprograms that you want to debug.
|
|
| 5. The program name is required for the LDD statements.
|
|
|
| 6. To invoke non-Language Environment DB2 program, change the program name
| in the SYSTSIN statements from TRADERD to EQANMDBG, and enter the
| DD name EQANMDBG followed by the program name TRADERD, and the
| appropriate TEST parameters.
| Due to the complexity of locating and updating the SYSTSIN statements, this
| scenario must be done manually. Follow the previous example to create the
| appropriate statements.
|
|
| Start Code Coverage without an interactive Debug Tool
| session
| Code Coverage aggregates statement execution information from multiple
| executions of a program. This information can be used to depict any statements
| that were not tested. This function is limited to Enterprise COBOL, Enterprise PL/I
| and z/OS XL C.
| You can invoke Code Coverage with or without an interactive debug session.
| For information about what compilers are supported and which compiler options
| are required for Code Coverage, see Appendix E, “Debug Tool Code Coverage,” on
| page 491.
| You can start Code Coverage without invoking an interactive Debug Tool session.
| To do the job, complete the following steps:
| 1. When you use the EQAJCL C option, Code Coverage data is generated without
| invoking a debugging session.
|
|
| 2. Select the program step name that you want to gather Code Coverage for.
|
|
|
| 3. To invoke Debug tool and do Code Coverage, a Language Environment
| variable EQA_STARTUP_KEY=CC is added to the CEEOPTS DD. The
| EQAOPTS DD statements are generated to provide the appropriate data sets
| for code coverage. After the program completes, you can review the code
| coverage information by using the Debug Tool Utilities option E Debug Tool
| Code Coverage.
|
|
| Start Code Coverage with an interactive Debug Tool session
| using the Terminal Interface Manager
| You can also create code coverage information during an interactive debugging
| session. To do the job, compete the following tasks:
| 1. Enter EQAJCL T to navigate to the Debug Tool Terminal Interface Manager
| menu.
|
|
|
| 2. Code Coverage is available for Enterprise COBOL, Enterprise PL/I or z/OS XL
| C programs that are compiled with certain compilers and with the appropriate
| options. To collect the code coverage information, enter a forward slash (/) for
| Code Coverage.
|
|
| 3. Select the program and step name that you want to debug and gather Code
| Coverage for.
|
|
|
| 4. The JCL shown will start a debug session on the Terminal Interface Manager,
| and collect code coverage information. After the debugging session completes,
| you can view this information by using the Debug Tool Utilities menu, option
| E Debug Tool Code Coverage.
|
|
| Debug a Language Environment VS COBOL II program
| compiled with the NOTEST option by using the Terminal
| Interface Manager
| If you do not debug VS COBOL II programs, skip this use case.
| You can use one of the following ways to debug a VS COBOL II program:
| v Use the TEST compilation option.
| v Use the NOTEST compilation option, which is described in this use case. This
| method is called LANGX COBOL in the Debug Tool manuals.
|
| 2. VS COBOL II programs might be linked either as Language Environment (LE)
| programs or non-Language Environment programs. In this use case, the
| program is linked as Language Environment enabled. Although this is a
| Language Environment program, you must still identify the Debug Tool debug
| libraries, and issue LDD statements for the modules that you want to debug.
| In addition, you can set breakpoints for subprograms, and set the Automonitor
| ON if you want.
|
|
|
| 3. Enter one or more names of the Debug Tool side file data sets that you want to
| use.
|
|
| 4. Enter the names of the main program and subprograms that you want to
| debug.
|
|
|
| 5. Enter the names of the subprograms that you want to set an entry breakpoint
| for.
|
|
| 6. The JCL for VS COBOL II Debug Tool invocation is created. To define the
| source and debug information during the debug session, the LDD statements
| and EQADEBUG libraries are required.
|
|
|
| Debug a non-Language Environment program when the debug
| member does not match the program name
| 1. To invoke Debug Tool JCL Wizard by using the Terminal Interface Manager,
| enter EQAJCL T.
|
|
| 2. Enter No if the program is not a Language Environment program.
|
|
|
| 3. Enter the name of the non-Language Environment program that you want to
| debug. The program name is ASAM1 in this use case.
|
|
| 4. Enter the name of Debug Tool debug libraries.
|
|
|
| 5. Enter the names of the programs that you want to request LDD statements for.
| The names are ASAM1 and ASAM2 in this use case.
|
|
| 6. Enter S to select or deselect a debug member for program ASAM1. If the
| program name or CSECT name is the member name of the debug file, no
| member ASAM1 was found.
|
|
|
| 7. The Set Source statement is built to map the program name with the debug
| member name.
|
|
| 8. Enter S to select the step that runs program ASAM1.
|
|
|
| 9. The SET SOURCE statement is generated.
|
|
| The end.
Batch facilities are provided so that collection of the code coverage data, using
selection criteria to create extracted observations, and report creation can be done
in unattended mode (batch).
The code coverage function in Debug Tool has the following advantages:
v You can use the same load modules that you use when you develop your
application to generate the code coverage data.
v In some cases, the debugger can help reach sections of code that are difficult to
simulate with a test case during development. When such needs arise, Debug
Tool marks the observations with special indicator so it is known that interaction
with the user created a deviation from the normal logic of the program.
v You can run code coverage unattended using batch facilities.
v XML is used to render information, which makes it easier for users to develop
their own facilities to present and evaluate information.
In addition to the XML report, you can also generate a Presentation report. This is
generated by selecting DTU Option E.5 sub-option 2 or 3. In batch specify the
PFMT parameter. An example of using EQAXCCR2 in batch to generate a
Presentation report can be found in hlq.SEQASAMP(EQACCPRP).
v The Viewer is part of Debug Tool Utilities. It is Option E.1 and allows the user
to analyze the code coverage observations interactively.
v The Viewer processes either the Observation file created by Debug Tool (1 in the
figure) or the code coverage extracted Observation file created by the code
coverage Extraction Utility (2 in the figure).
v When you first select Option E.1, you are prompted to provide the name of the
file that you want the Viewer to use.
v The Viewer provides the following functionality:
– Sorting entries.
– Viewing an annotated listing associated with an entry. When you are viewing
an annotated listing, no selection criteria is applied. Every line of the listing is
included and marked as executed or unexecuted as specified in the
observation.
Setup
Preparing your program
One of the benefits of using this approach to create code coverage observations is
that you can use the same load modules that you prepare for debugging your
application with Debug Tool. Programs written in COBOL, PL/I and C and
compiled with certain compiler options are supported.
Code Coverage is supported for Enterprise PL/I for z/OS Version 4.2 and above.
The following compiler options are required to ensure that the SYSDEBUG side file
contains the complete expanded program source and statement table:
v TEST(SEPARATE) - the ALL and NOHOOK sub-options are also recommended
but not required.
v GONUMBER(SEPARATE) - required to produce the statement table in the
SYSDEBUG side file.
v MACRO or PP(MACRO) - required if there are %INCLUDE statements in the
source. Using the MACRO suboption CASE(ASIS) will leave the case of the
source unchanged.
v LISTVIEW(AFTERALL) - required if include files, EXEC CICS commands, or
SQL code are in the source.
EQAOPTS commands
EQAOPTS commands are used to provide data set names for the XML output and
a list of program names that require code coverage.
CCOUTPUTDSN
Specifies the file name of an MVS sequential data set. The file contains
code coverage output in XML format.
Example:
EQAXOPT CCOUTPUTDSN,’&&USERID.DBGTOOL.CCOUTPUT’
EQAXOPT CCOUTPUTDSNALLOC,’MGMTCLAS(STANDARD) +
STORCLAS(DEFAULT) LRECL(255) BLKSIZE(0) RECFM(V,B) +
DSORG(PS) SPACE(2,2) CYL’
EQAXOPT CCPROGSELECTDSN,’&&USERID.DBGTOOL.CCPRGSEL’
EQA_STARTUP_KEY
The EQA_STARTUP_KEY is an environment variable. The format for specifying
this environment variable is as follows: ENVAR("EQA_STARTUP_KEY=ACTION").
Debug Tool uses the EQA_STARTUP_KEY environment variable and TEST runtime
options to determine whether to activate an interactive debug session and code
coverage session or not. The following table shows different combinations of the
environment variable and TEST runtime options, and the resultant session
activation.
Note: There are two different code coverage sessions: Debug Tool code coverage
session and RDz code coverage session. Debug Tool handles the Debug Tool code
coverage session. RDz handles the RDz code coverage session. The code coverage
data format and presentation are different in the two sessions.
Examples:
v ’/TEST(ALL,*,PROMPT,MFI:*),ENVAR("EQA_STARTUP_KEY=CC")’
– Using DT MFI, and specifying CC.
– Code Coverage observations are collected.
v ’/TEST(ALL,*,PROMPT,VTAM%userid:*),ENVAR("EQA_STARTUP_KEY=DCC")’
– Using Debug Tool MFI with the Terminal Interface Manager, and specifying
DCC.
– An interactive debug session is started and Code Coverage observations are
collected while it is running.
v ’/TEST(ALL,*,PROMPT,TCPIP&nn.nn.nn.nn%8001:*),ENVAR("EQA_STARTUP_KEY=DCC")’
– Using Debug Tool TCPIP with the PDTools Studio or RDz, and specifying
DCC.
– An interactive debug session is started, and Code Coverage observations are
collected while the debug session is running.
You can specify how Debug Tool selects such programs by providing a Selection
file. You can create the Selection file by using Debug Tool Utilities Option E.3 or by
manually coding the file by following the Selection file XML DTD syntax.
There are two different types of selection criteria attributes. The first group selects
the entries that are to be extracted from the observation data set that is created by
Debug Tool. The other group operates from within the subset that is created after
applying the first group of attributes. The second set of attributes is designed for
further selection of the statements to be considered in the final statistical results
based on the contents of the program source.
The comparison operators include: equal (E), greater than (G), less than (L), greater
than or equal (GE), less than or equal (LE), and not equal (NE). If no value is
entered for an attribute, it means that any value is valid and the selection process
does not examine the attribute.
Source markers
The source markers provide a way to select the source lines that are to be marked
in the report file and called out in the statistics calculation for code coverage.
These are based on the indicators in the source like a comment, numeric sequence,
a range of statements, and a string at a specific place in the source listing. An
indicator marks a statement or section of statements that have been changed or
added as a result of a defect fix or enhancement. A source marker definition
consists of the following elements:
Marker type
Single source line or a section of source lines
v SINGLE
v SECTIONBEGIN
v SECTIONEND
Selection
INCLUDE or EXCLUDE
Start column
Marker search starts at this column in a source line
End column
Marker search ends at this column in a source line
Indicator
Character (xxxx) or hex (X'nnnn')
Note:
v Multiple markers can be defined.
v Section source markers must come in pairs, such as SECTIONBEGIN and
SECTIONEND.
The first entry in the table indicates to mark as included in the report file and call
out in the statistics calculation only statements that have the string PMR12345 in
columns 73 - 80.
The second entry in the table indicates to mark as excluded in the report file and
call out in the statistics calculation only statements that have the string MOVE in
columns 7 - 72.
The third and fourth entries in the table indicate to mark as included only the
statements beginning with the first statement that has the string DEFECT123BEGIN
between columns 7 - 80 until the statement that has the string DEFECT123END
between columns 7 - 80.
Based on the Selection options in the example above, the report marks the sections
of the source that matches the specified selection.
Based on the sample source markers above, the report shows the lines as follows:
v Line 2 is both included and excluded
v Lines 3 and 4 are excluded
v Lines 6, 8, and 9 are included
The Selection file can be created by using Debug Tool Utilities Option E.3, or you
can code the file manually by following the Selection file XML DTD syntax.
1 Observation viewer
Browse code coverage observations.
4 Observation extraction
Extract code coverage observations using selection criteria.
5 Report generation
Create report.
After you select suboption 1, you are prompted to provide the name of the data set
for the code coverage observations that you want to view. The following screen
shows the panel with the name of the data set that the viewer uses.
---------------- Debug Tool - Code Coverage Observation Viewer ---------------
Command ===>
Specify the name of a code coverage observation data set that you
want to browse.
After you specify the location of the file, press enter to move to the viewer where
you can view the observations in table format. The following screen shows the
entries for a group of observations. The viewer provides the following functions:
v Sort table entries.
v View an annotated listing that is associated with an entry.
When you enter a forward slash (/) in the sort the table entries field, you are
prompted with a pop-up panel where you can choose the sorting options to sort
the table entries to your specifications. The following screen shows the Table Sort
Pop-up panel.
You can sort the table entries using column key number
(1 - 13) and sort sequence (A or D).
After you choose Option E.2, you are prompted to provide the location of the file
that will be used to save the Options. If the file has not been previously created, it
will be created for you. In the following screen, you can see this panel.
--------------------- Debug Tool - Code Coverage Options ---------------------
Command ===>
Specify the name of a code coverage options data set name that you
want to create or edit.
The data set contains a list of program names and group IDs that are
used when collecting code coverage observations.
After the Options file is created, you can proceed to the Options panel. You can
specify the programs that you want code coverage observations for and the group
or subgroup to use to group such results. The panel is tailored after other Debug
Tool panels that are used for creating debug profiles. The following screen shows
the Options panel. You have two sections in this panel:
v Program selection.
– In this section, you can specify up to 8 programs or you can use an asterisk
(*) instead of a program name or you can end the name of a program with an
asterisk (*) to create a template for a group of programs with the same prefix
in the name.
v Group selection.
– You can use Group ID 1 and Group ID 2 for grouping results.
– If you want to provide a group during the observation selection, you should
specify a group. If the group is in the Viewer, you can sort the entries in the
Viewer by the group.
– You can use a wildcard (*) or leave it blank if you do not want to use a
group.
Program name list for code coverage. (* is a valid wild card character,
by itself, or as the last character of a name)
Group ID 1: COST
Group ID 2: BENEFIT
After you exit this panel, the Options file is written with your options using the
Options file XML DTD syntax (See “XML Tags used in the Options file” on page
520). As mentioned before, you can skip the use of Option E.2 and hand code the
contents of the file.
The data set contains selection criteria and source markers used to select
code coverage observations and percentage calculations.
After you provide the name of the data set, press Enter to create or modify your
Selection file. The following screen shows the selection attributes panel.
The marker section allows only five markers to be specified. If you need more than
five, you need to add the additional entries by hand using the Selection file XML
DTD syntax (See “XML tags used in the Selection file” on page 520).
Most of the field above are self-explanatory or have been described before in this
document. The following section describes the operators and the meaning of the
Roll-Up fields.
Operators
E = Equal
G = Greater than
L = Less than
GE = Greater or Equal
LE = Less or Equal
NE = Not Equal
Roll-up
The qualified observations might come from different test cases; the executed
statement lists might overlap; and, by combining together, the code coverage
percentage might be improved.
You can define the roll-up option of the four attributes as follows:
Attribute Rollup option
---------- -------------
GroupID1 Y
GroupID2 Y
UserID Y
DbgOv Y
The roll-up process merges #1 and #2 together even when the values of GroupID2
and DbgOv are different because the roll-up option of the two attributes is Yes.
After the two observations are merged, the code coverage percentage becomes 90%
because the executed statements in #1 and #2 overlap.
After you press Enter, you will get a confirmation message on the upper right
corner, 'Observation extract OK'. If there is an error during the process, an error
message is displayed. By pressing F1, a long message appears at the bottom of the
panel.
--------------- Debug Tool - Code Coverage Observatio Extract observations OK
Command ===>
The following screen shows the Code Coverage Report Generation panel:
---------------- Debug Tool - Code Coverage Report Generation ----------------
Command ===>
The report generator adds marked source statements and code coverage
statistics to the extracted observations. It writes the result
to the report output data set along with the selection criteria.
The annotated listing begins with a table of information about the observations
that is similar to an entry in the Viewer. After that, the source listing is displayed
with annotation showing which executable lines were executed or not executed.
XML and presentation reports also contain additional annotation for included and
excluded lines (as indicated by the source markers in the Selection file). The result
is written to the specified output data set. If option 3 was requested, the output
data set is browsed via ISPF but not deleted upon exit.
Rollup History:
Observation is not part of rollup.
----+-*A-1-B--+----2----+----3----+----4----+----5----+----6----+----7-|--+----8
1 * COB01A - COBOL EXAMPLE FOR DTCU
2
3 IDENTIFICATION DIVISION.
4 PROGRAM-ID. COB01A.
5 ******************************************************************
6 * Licensed Materials - Property of IBM *
7 * *
8 * 5655-M18: Debug Tool for z/OS *
9 * 5655-M19: Debug Tool Utilities and Advanced Functions for z/OS *
10 * (C) Copyright IBM Corp. 1997, 2004 All Rights Reserved *
11 * *
12 * US Government Users Restricted Rights - Use, duplication or *
13 * disclosure restricted by GSA ADP Schedule Contract with IBM *
14 * Corp. *
15 * *
16 ******************************************************************
17
18
19 ENVIRONMENT DIVISION.
20
21 DATA DIVISION.
22
23 WORKING-STORAGE SECTION.
24 01 TAPARM1 PIC 99 VALUE 5.
25 01 TAPARM2 PIC 99 VALUE 2.
26 01 COB01B PIC X(6) VALUE ’COB01B’.
27 01 P1PARM1 PIC 99 VALUE 0.
28
29 01 TASTRUCT.
30 05 LOC-ID.
31 10 STATE PIC X(2).
32 10 CITY PIC X(3).
33 05 OP-SYS PIC X(3).
34
35 PROCEDURE DIVISION.
36
37 * THE FOLLOWING ALWAYS PERFORMED
38
Start End
Marker type Selection Column Column String
------------- --------- ------ ------ ------------------------------
SINGLE INCLUDE 73 75 PMR
SINGLE EXCLUDE 73 80 PMR11114
SECTIONBEGIN INCLUDE 7 80 DEFECT123BEGIN
SECTIONEND INCLUDE 7 80 DEFECT123END
Rollup History:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----8
1 PLI01A:PROC OPTIONS(MAIN); /* PL/I DTCU TESTCASE */
Start End
Marker type Selection Column Column String
------------- --------- ------ ------ ------------------------------
SINGLE INCLUDE 2 80 PLI01
SINGLE EXCLUDE 2 80 PLI01B
Rollup History:
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
1 main()
2 /********************************************************************/
3 /* Licensed Materials - Property of IBM */
4 /* */
5 /* 5655-W70: Debug Tool for z/OS */
6 /* Copyright IBM Corp. 1997, 2012 All Rights Reserved */
7 /* */
8 /* US Government Users Restricted Rights - Use, duplication or */
9 /* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.*/
10 /* */
11 /********************************************************************/
12
13 { /* DEFECT456BEGIN */
14 I> int EXPARM1 = 5; PMR13579
15 I> int EXPARM2 = 2; PMR13579
16 extern void C01B(void);
17 I< void PROCA(int); /* function not called */
Start End
Marker type Selection Column Column String
------------- --------- ------ ------ ------------------------------
SINGLE INCLUDE 73 76 PMR1
SINGLE EXCLUDE 73 80 PMR12345
SECTIONBEGIN INCLUDE 8 72 DEFECT456BEGIN
SECTIONEND INCLUDE 8 72 DEFECT456END
The following table shows the column layout for the source lines:
Table 22. The column layout for the source lines
Columns Contents
1 Blank.
2 through 7 6 digit listing line number, right justified,
leading zeros suppressed.
9 If executable and not using E.1 (V)iew then:
v 'I' included
v 'E' excluded
v 'B' both included and excluded
v ' ' neither included nor excluded
If not executable or using E.1 (V)iew then:
v ''
10 through 15 1 column per statement on this line. For
example, col 10 represents the 1st statement,
column 11 represents the 2nd statement.
You can run the code coverage Extraction Utility in batch by running the
EQAXCCX2 REXX exec. You must specify the following DDNAMES:
EQACSINP
Location of Observation file.
EQACSSEL
Location of Selection file.
EQACSOUT
Location of output code coverage extracted observations file.
All three files are allocated either as a sequential file or PDSE. The file format
should be VB and LRECL=255. If it is a PDSE file, the data set name must include a
member name.
Report functions
XML Report
This function composes a full XML file for reporting purpose. The file contains the
data for a report writer to write a readable report or an HTML file for the browser.
A full report XML file contains the following two sections:
v The observation section contains the selected observations. Each observation
includes statements which might be marked as included or excluded and code
coverage extracted observations XML tags that are generated from the report
generator.
v The selection criteria section contains the selection criteria and source markers.
The code coverage Report Utility can be started in batch by starting the
EQAXCCR2 REXX exec with the XML parameter. You must specify the following
DDNAMES:
EQACRINP
Code coverage extracted observations that are based on selection criteria.
EQACRSEL
Code coverage Selection file.
EQACROUT
XML report output.
All three files are allocated either as a sequential file or PDSE. The file format is VB
for the XML file, VBA for the Presentation file, and LRECL=255. If it is a PDSE file,
the data set name must include a member name.
A Presentation report can also be generated. It contains the same data as the XML
report, except it is presented in a viewer friendly format.
In CICS, run the DTCN transaction and press PF9 (OPTions) and fill it in as
follows:
DTCN Debug Tool CICS Control - Menu 2 S07CICPB
Then press PF3 (RETURN), on this screen, PF4 (SAVE) on the main DTCN screen,
and PF3 (EXIT) to exit DTCN. Then run your transaction. Each transaction you run
will append a new set of observations to the Observation file.
This will run the transaction in unattended mode. If you want to interact with
Debug Tool while collecting observations, remove the Commands file from the
Options panel shown above, and change the value of EQA_STARTUP_KEY to
DCC.
The three tags are defined in the table of common tags and XML tags and the
contents.
In batch mode, Debug Tool receives its input from the primary commands file, the
USE file, or the command string specified in the TEST run-time option, and writes
its normal output to a log file.
Note: You must ensure that you specify a log data set.
Commands that require user interaction, such as PANEL, are invalid in batch mode.
You might want to run a Debug Tool session in batch mode if:
v You want to restrict the processor resources used. Batch mode generally uses
fewer processor resources than interactive mode.
v You have a program that might tie up your terminal for long periods of time.
With batch mode, you can use your terminal for other work while the batch job
is running.
v You are debugging an application in its native batch environment, such as
MVS/JES or CICS batch.
When Debug Tool is reading commands from a specified data set or file and no
more commands are available in that data set or file, it forces a GO command until
the end of the program is reached.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Chapter 15, “Starting Debug Tool in batch mode,” on page 137
Starting DTST
This topic describes the methods of starting DTST and gives examples.
Before you begin, if you need to modify storage, verify with your system
programmer that you have the authority to modify CICS key storage, USER key
storage, or both. "Authorizing DTST transaction to modify storage" in Debug Tool
Customization Guide describes the steps the system programmer must do to
authorize you to modify CICS key storage, USER key storage, or both.
You can start the DTST transaction with or without specifying a base address. A
base address can be any of the following items:
v A literal hexadecimal number (for example, 45CB00)
v A 64 bit address (for example, 48_40B00000)
v The name of a program (for example, MYPGM)
v An offset calculation or indirection (for example, 45CB00+40)
You can also specify that DTST take a specific action when it starts. You specify an
action with one of the following characters:
v P, which means to page forward or backward.
v S, which means to search through storage until a specific target is found.
“Syntax of the DTST transaction” on page 532 describes all the parameters.
Before you begin, verify with your system programmer that you have the authority
to modify CICS key storage, USER key storage, or both. "Authorizing DTST
transaction to modify storage" in Debug Tool Customization Guide describes the steps
the system programmer must do to authorize you to modify CICS key storage,
USER key storage, or both.
After you verify that the previous DTST command ran successfully, you can do the
following steps to modify storage.
1. Press PF9 to enter modify mode. The command line becomes protected, and
columns four through seven become unprotected.
2. Move your cursor to data you want to modify and type in the new data. You
can modify several different locations at the same time.
3. Press Enter. DTST verifies that the data you entered is valid. DTST makes all
modifications that contain valid data. If any word contains invalid data, the
line contains that word is highlighted. You can correct the invalid data, then
press Enter to verify the change.
4. Press any function key to end modify mode. However, you can not press any
of the following keys:
v PF10
v PF11
v the CLEAR key
v the Enter key when you have typed in any modifications
Some of the following PF keys work only if the previous operation was successful.
If the previous operation was successful, the word Normal is displayed in the
Response field.
PF1 (Help)
Displays the help screen. The help screens display command syntax with
examples and lists all keywords.
PF2 (Retrieve)
Retrieves the previous command from the command history. DTST stores up to
10 commands in the command history, discarding the older commands to save
newer commands.
PF3 (Exit)
Clears the screen and ends the transaction.
PF5 (RepeatScan)
Repeats the scan operation.
PF7 (Up)
Moves one page (256 bytes) back in storage. The base address is not
recalculated.
PF8 (Down)
Moves one page (256 bytes) forward in storage. The base address is not
recalculated.
PF9 (Modify)
Starts modify mode.
Enter
DTST does one of the following tasks:
v When the cursor is on a fullword, DTST uses that fullword as the base
address for the next command.
v Recalculates the base address from the input string, even if it has not
changed, then changes the memory window so that the new base address is
shown at the top of the screen.
►► DTST base_address ►◄
,
▼ request
base_address:
P = program_name
address + displacement *
BASE - @
request:
request_letter = value
modifier
►► S 1 = 'text' ►◄
- B hex_bytes
2
H
4
W
8
D
15
DD
value
Hexadecimal or decimal value or a string enclosed in quotation marks (") or
apostrophes ('). It is used to indicate the number of pages you want DTST to
scroll or the target of a search.
Examples
To indicate that you want to display the fifth page (or screen) of memory after the
address x'01000000', enter the command DTST 01000000,P=5. This is equivalent to
entering DTST 01000000, then pressing PF8 five times.
To indicate that you want to find x'00404040' starting at address x'01000000', enter
the command DTST 01000000,S=00404040.
If you want all load modules to be processed, you can omit this DD
statement, direct it to DUMMY, or direct it to empty data set. This file
must be in fixed block record format (RECFM=FB) with a logical record
length of 80 (LRECL=80). Each control statement must be on a separate
line. The entries are free-form and you can use blanks before or after each
keyword and operator. You can include comments by placing an asterisk in
column 1.
EQASYSPF
Specifies a list of system prefixes. This is a list of prefixes of names of
CSECTs that you want Load Module Analyzer to recognize as system
routines. The list helps limit the amount of output displayed for these
prefixes. This file must be in fixed block record format (RECFM=FB) with a
logical record length of 80 (LRECL=80). Debug Tool provides data for this
Debug Tool supplies data for this file in member EQALMPFX of the table library
(SEQATLIB). If you want to add entries to this file, do one of the following tasks:
v Update the EQALMPFX member in hlq.SEQATLIB through the SMP/E
USERMOD in hlq.SEQASAMP(EQAUMOD3).
v Create a data set containing the new entries. Then, concatenate this data set to
the one that ships with Debug Tool.
Each line in this file represents one entry. The entries are free-form; however, each
item must be separated from the previous item by one or more blanks. You can
include comments by placing an asterisk in column 1. Use the following syntax for
each line:
prefix I L description
prefix
A one to seven character prefix.
I Include indicator. Specify a "1" to indicate that each CSECT beginning with this
prefix is to be treated as an ordinary CSECT. Specify a "0" to indicate that
CSECTs beginning with this prefix are not to be listed individually.
L Language or system component indicator. Choose from one of the following
characters:
B COBOL
N Enterprise COBOL for z/OS, Version 4 or later
V OS/VS COBOL
P PL/I
E Enterprise PL/I
C C/C++
A Assembler
L Language Environment
S CICS
I IMS
2 DB2
M MVS
T TCP/IP
* Unclassified.
Debug Tool provides data for this file in member EQALMPGM of the table library
(SEQATLIB). If you want to add entries to this file, do one of the following tasks:
v Update the EQALMPRM member in hlq.SEQATLIB through the SMP/E
USERMOD in hlq.SEQASAMP(EQAUMOD4).
v Create a data set containing the new entries. Then, concatenate this data set to
the one that ships with Debug Tool.
Each line represents one entry. The entries are free-form. The program number
must begin in column 1 and each item must be separated from the previous item
by one or more blanks. You can include comments by placing an asterisk in
column 1. You cannot use sequence numbers in this file. Use the following syntax
for each line:
program_name L program_description
program_name
A seven character program number.
L Language or system component indicator. See “Description of EQASYSPF file
format” on page 539 for a list of possible values.
program_description
A description of the program.
The transaction displays the results in the Debug Tool - NEWCOPY Program
panel. If the NEWCOPY action fails, the transaction runs the PHASEIN action, so
CICS uses a new copy of the application for all new transaction requests.
Refer to the following topics for more information related to the material discussed
in this topic.
Related tasks
Description of the CEMT SET PROGRAM command in CICS Transaction Server for
z/OS: Supplied Transactions, SC34-7004.
To install these plug-ins, follow the steps found in the website at “IBM Problem
Determination Tools Plug-ins V13 Combined Packages”( http://www.ibm.com/
support/docview.wss?uid=swg24033351).
1. Go to IBM Problem Determination Tool Plug-ins (http://www.ibm.com/
software/awdtools/deployment/pdtplugins/).
2. Click Link to download page that is next to “IBM Debug Tool Plug-in for
Eclipse”.
3. Download the compressed file containing the DT plug-in from the IBM Debug
Tool plug-in for Eclipse website.
4. Follow the instructions in “DT Plug-in Readme PDF” to install the Debug Tool
plug-in. 18
5. Verify that your system administrator has completed the following tasks
described in the Debug Tool Customization Guide:
v “Adding support for the DTCN Profiles view and APIs”
v “Adding support for the DTSP Profile view”
6. Restart your Eclipse-based application.
Establishing a connection between the DTCN Profiles view for CICS and your
z/OS system
17. You can use CICS debug configurations to manage DTCN profiles with Rational Developer for System z. To learn more about
CICS debug configurations, see the topic “Debugging CICS applications” in the Developer for System z, Version 8, information
center. If you choose to use CICS debug configurations, you do not need to follow the rest of the instructions in this topic.
18. As seen in the DT Plug-in Readme PDF instructions, Rational Developer for System z already contains the IBM Debug Tool
plug-in. Download the DT plug-in which is contained in the compressed file only when you are not using Rational Developer
for System z. However, you can still install the DTCN and DTSP plug-ins directly in Rational Developer for System z by
following the instructions in the DT Plug-in Readme PDF.
The connection is successful when you see a green icon for the DTCN
connection. Otherwise, review the information you entered, correct any
mistakes, and try the connection test again. You can also review the trace file
(see “Locating the trace file of the DTCN Profile, the DTSP Profile, Instrument
JCL for Debug Tool Debugging, Code Coverage, and Load Module Analyzer
view” on page 555) for diagnostic information that can help identify a mistake.
9. In the DTCN Local Profiles view, right click DTCN Local Profiles, then click
on Create context menu to create local profiles. These profiles are saved on
your local workspace. The color highlighted local profile means that it is the
same as server profile.
Specify the settings needed to establish a connection between the DTSP Profile
view and your z/OS system by taking the following steps:
1. Click Window>Show view>Other.
2. Type "DTSP" in the text box at the top of the window. Select DTSP Local
Profiles, DTSP Server Profiles, and click OK.
3. Click Window>Show view>Other.
4. Type "Host Connections" in the text box at the top of the window. Select Host
Connections and click OK.
5. In the Host Connections view, select Problem Determination Tools for z/OS
and click Add to create a connection to the Problem Determination Tools for
z/OS Common Component Server.
6. Specify the settings in the following fields and click Save and Close:
Name The name of the connection. It is autofilled by combining the host
name and port number that you specified with ":".
Host name
The TCP/IP name or address of the z/OS system, which is set by the
system administrator according to the instructions in “Installing the
server components for IBM Debug Tool DTCN and DTSP Profile
Manager” in the Debug Tool Customization Guide.
Port number
The port number of the z/OS system, which is set by the system
administrator according to the instructions in “Installing the server
components for IBM Debug Tool DTCN and DTSP Profile Manager”
in the Debug Tool Customization Guide.
Default encoding
The default encoding is "cp037". If you use a different encoding
scheme, specify it in this field.
7. Click Window>Preferences.
8. Click Debug Tool>DTSP (non-CICS) in the navigation pane.
9. In the Preferences window, select the Problem Determination Tools connection
you created from the Connection list and click Connect.
10. If this is the first time you are connecting to the IBM Problem Determination
Tools Common Component Server, click Yes in the Certificate Information
window.
11. In the Problem Determination Tools Signon window, specify the settings in the
following fields, or select Use existing Credentials if you have at least one
credential defined, and click OK:
Credentials Name
The name of the credential. You can leave it blank for default.
User Id
The ID that you use to log on to the z/OS system. The DTSP Profile
substitutes this ID for the &userid token in the Profile name pattern
field.
Password or Passphrase
The password or passphrase that you use to log on to the z/OS
system.
In the views, you can right click anywhere to see a list of actions available. If you
need to change your connection settings, you can right click in any area of the
DTSP Profile view and select Preferences.
You can access the Instrument JCL for Debug Tool Debugging Plug-in by taking
the following steps:
1. Click Window > Show view > Other.
2. Type “Instrument JCL for Debug Tool Debugging” in the text box at the top of
the window or scroll down until you find this entry in the drop-down menu.
Select and click OK. The view contains the following options:
User Settings
Modify job card, and specify the names of the commands and
preferences files.
System Settings
Specify library location that contains specific Debug Tool and Language
Environment components.
Prepare and Start Debug session
Specify a JCL and start debug session.
FTP Connection Settings
Specify host name, user ID, and password for connection to server.
Usage notes
1. JCLs that use PROC are not supported.
2. If the invocation method described above in Prepare and Start Debug Session
Wizard 3 uses the Debug Tool Language Environment user exit EQAD3CXT,
see the Specifying the TEST runtime options through the Language Environment user
exit chapter in the Debug Tool User's Guide or the Debug Tool Customization Guide
for further details about how to use the user exit.
3. The plug-in's default is to start a debug session by using the Debug perspective
in RD/z, PD Tools Studio or Z/OS Explorer. However, you can direct the
debug session to a Terminal Interface Manager session. See “Starting a
debugging session in full-screen mode using the Terminal Interface Manager or
a dedicated terminal” on page 139 for more information on using Terminal
Interface Manager.
| You can access Debug Tool Code Coverage Plug-in by taking the following steps:
| v Click Window > Show view > Other.
| v Type "Debug Tool Code Coverage" in the text box at the top of the window or
| scroll down until you find this entry in the drop-down menu. Select and click
| OK. The view contains the following options:
| Debug Tool code Coverage Option Files
| Modify the debug tool code coverage options.
| Code Coverage Report Generation
| Create code coverage reports.
| Establishing a connection between the Code Coverage view and your z/OS
| system
| 1. Select "Host connections" view.
| 2. In the Host Connections view, select Problem Determination Tools for z/OS
| and click Add to create a connection to the Problem Determination Tools for
| z/OS Common Component Server.
| 3. Specify the settings in the following fields and click Save and Close:
| Name The name of the connection. It is auto filled in by combining the host
| name and port number that you specified with a ":".
| Host name
| The TCP/IP name or address of the z/OS system, which is set by the
| system administrator according to the instructions in "Server Overview"
| in the Common Component Customization Guide and User’s Guide.
| Port number
| The port number of the z/OS system, which is set by the system
| administrator according to the instructions in "Server Overview" in the
| Common Component Customization Guide and User’s Guide.
| Default encoding
| The default encoding is "cp037". If you use a different encoding
| scheme, specify it in this field.
| 4. If this is the first time you are connecting to the IBM Problem Determination
| Tools Common Component Server, click Yes in the Certificate Information
| window.
| 5. In the Problem Determination Tools Signon window, specify the settings in the
| following fields, or select Use existing Credentials if you have at least one
| credential defined, and click OK:
| Credentials Name
| The name of the credential. You can leave it blank for the default.
| User Id
| The ID that you use to log on to the z/OS system.
| You can access the Debug Tool Load Module Analyzer Plug-in by taking the
| following steps:
| v Click Window > Show view > Other.
| v Type “Load Module Analyzer” in the text box at the top of the window or scroll
| down until you find this entry in the drop-down menu. Select and click OK. The
| view contains the following options:
| Load Module Analyzer Report Generation
| Create load module analyzer reports.
| Refresh Current User
| Display available reports for the current logged in user.
| Establishing a connection between the Load Module Analyzer view and your
| z/OS system (refer to Code Coverage Plug-in section)
Locating the trace file of the DTCN Profile, the DTSP Profile,
Instrument JCL for Debug Tool Debugging, Code Coverage, and Load
Module Analyzer view
When you do actions in the DTCN Profiles, DTSP Profile, Instrument JCL for
| Debug Tool Debugging, Code Coverage, or Load Module Analyzer view, the
views save information about the actions and results of the actions in the following
files:
v .com.ibm.pdtools.debugtool.dtcn.trace.log for the DTCN Profiles view
v .com.ibm.pdtools.debugtool.dtsp.trace.log for the DTSP Profiles view
v .com.ibm.pdtools.debugtool.bjfd.trace.log for the Instrument JCL for Debug
Tool Debugging view
| v .com.ibm.pdtools.debugtool.dtcc.trace.log for the Code Coverage view
| v .com.ibm.pdtools.debugtool.dtlma.trace.log for the Load Module Analyzer
| view
The views save these files in the \.metadata folder of your workspace. (To find the
path name of your workspace, click File>Switch Workspace>Other... in your
Eclipse-based application.) The example below shows the file information about a
common action and the action result.
The last line of the trace is one line; however, the line is wrapped in this example
so that you can see the entire contents of the line.
The following example shows what the file might contain after you click on Finish
in the update wizard:
---- DTSP Finish button clicked ----
Profile data set: vikram2.dbgtool.eqauopts
UEWizard: Read successful.
DT_Update request worked fine. ------
Retrieving Profile -----
GetOtherProfiles: Socket is good -----
GetOtherProfiles: Hashmap contains {otheropts=sto(ff), sessport=8002,
sessaddr=9.65.111.33, level=ERROR, preferencefile=*, commandfile=*,
trigger=TEST, sesstype=TCPIP, profiledata set=vikram2.dbgtool.eqauopts}
The following example shows what the file might contain after you click on the
Next button in the Prepare and Start Debug Session wizard page 4:
[2013-09-26 10:29:47,516] 1286203 DEBUG
-- Text to be inserted:TCPIP&9.65.131.12%8001:
--[ com.ibm.pdtools.bjfd.ui.wizards.DebugSessionWizardPage5.setVisible
(DebugSessionWizardPage5.java:105) ]
[2013-09-26 10:29:47,519] 1286206 DEBUG
-- working directory:C:\Apps\workSpace\eclipse421\runtime-New_configuration3\parser\
--[ com.ibm.pdtools.bjfd.ui.wizards.DebugSessionWizardPage5.setVisible
(DebugSessionWizardPage5.java:113) ]
[2013-09-26 10:29:47,636] 1286323 DEBUG
-- Extracting text
--[ com.ibm.pdtools.bjfd.ui.actions.FileControlManager.extractText(FileControlManager.java:95) ]
[2013-09-26 10:29:47,647] 1286334 DEBUG
-- writing to JCL file
--[ com.ibm.pdtools.bjfd.ui.actions.FileControlManager.writeJCLFile(FileControlManager.java:161) ]
[2013-09-26 10:29:47,648] 1286335 DEBUG
-- Populdated steplib text://* >>>The JCL lines above were inserted by Debug Tool.<<<
--[ com.ibm.pdtools.bjfd.ui.actions.UIManager.populateStepLibText(UIManager.java:270) ]
[2013-09-26 10:29:47,649] 1286336 DEBUG
-- Modifiled text needs to be inserted:
//GO EXEC PGM=ECOB420
//STEPLIB DD DISP=SHR,DSN=JSMITH.TEST.LOAD
//* >>>The JCL lines above were inserted by Debug Tool.<<<
// DD DISP=SHR,DSN=ESFLINT.CEEV1RDZ.SCEERUN
// DD DISP=SHR,DSN=ESFLINT.CEEV1RDZ.SCEERUN2
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD DUMMY
//SYSOUT DD SYSOUT=*
/*
//* >>>The JCL lines below were inserted by Debug Tool.<<<
//CEEOPTS DD *,DLM=’/*’
TEST(ALL,’-JSMITH.EOI.INSPIN(EOI1)’,PROMPT,
TCPIP&9.65.131.12%8001:-JSMITH.EOI.INSPPREF)
//INSPLOG DD SYSOUT=*
//* >>>The JCL lines above were inserted by Debug Tool.<<<
--[ com.ibm.pdtools.bjfd.ui.actions.FileControlManager.writeJCLFile(FileControlManager.java:244) ]
[2013-09-26 10:29:47,652] 1286339 DEBUG
-- Writing to output file
--[ com.ibm.pdtools.bjfd.ui.actions.FileControlManager.writeJCLFile(FileControlManager.java:262) ]
To learn more about how to use the search facility provided in the IBM System z
Enterprise Development Tools & Compilers information center, you can view the
multimedia presentation at http://publib.boulder.ibm.com/infocenter/pdthelp/
v1r1/index.jsp?topic=/com.ibm.help.doc/InfoCenterTour800600.htm.
Subscribe to receive e-mail notifications about fixes and other IBM Support
information as described in Subscribing to Support updates..
My Notifications
With My Notifications, you can subscribe to Support updates for any IBM product.
You can specify that you want to receive daily or weekly email announcements.
You can specify what type of information you want to receive (such as
publications, hints and tips, product flashes (also known as alerts), downloads, and
drivers). My Notifications enables you to customize and categorize the products
about which you want to be informed and the delivery methods that best suit your
needs.
After trying to find your answer or solution by using other self-help options such
as technotes, you can contact IBM Support. Before contacting IBM Support, your
company must have an active IBM maintenance contract, and you must be
authorized to submit problems to IBM. For information about the types of
available support, see the information below or refer to the Support portfolio topic
in the Software Support Handbook at http://www14.software.ibm.com/webapp/
set2/sas/f/handbook/offerings.html.
v For IBM distributed software products (including, but not limited to, Tivoli®,
Lotus®, and Rational products, as well as DB2 and WebSphere products that run
on Windows, or UNIX operating systems), enroll in Passport Advantage® in one
of the following ways:
Online
Go to the Passport Advantage Web site at http://www.lotus.com/
services/passport.nsf/ WebDocs/Passport_Advantage_Home and click
How to Enroll.
By phone
For the phone number to call in your country, go to the Contacts page of
the IBM Software Support Handbook on the Web at http://
www14.software.ibm.com/webapp/set2/sas/f/handbook/contacts.html
and click the name of your geographic region.
v For customers with Subscription and Support (S & S) contracts, go to the
Software Service Request Web site at http://www.ibm.com/support/
servicerequest.
v For customers with IBMLink, CATIA, Linux, S/390®, iSeries, pSeries, zSeries,
and other support agreements, go to the IBM Support Line Web site at
http://www.ibm.com/services/us/index.wss/so/its/a1000030/dt006.
v For IBM eServer™ software products (including, but not limited to, DB2 and
WebSphere products that run in zSeries, pSeries, and iSeries environments), you
can purchase a software maintenance agreement by working directly with an
IBM sales representative or an IBM Business Partner. For more information
about support for eServer software products, go to the IBM Technical Support
Advantage Web site at http://www.ibm.com/servers/eserver/techsupport.html.
IBM Support needs you to supply a severity level. Therefore, you need to
understand and assess the business impact of the problem that you are reporting.
Use the following criteria:
Severity 1
The problem has a critical business impact. You are unable to use the
program, resulting in a critical impact on operations. This condition
requires an immediate solution.
Severity 2
The problem has a significant business impact. The program is usable, but
it is severely limited.
Severity 3
The problem has some business impact. The program is usable, but less
significant features (not critical to operations) are unavailable.
Severity 4
The problem has minimal business impact. The problem causes little
impact on operations, or a reasonable circumvention to the problem was
implemented.
For more information, see the Getting IBM support topic in the Software Support
Handbook at http://www14.software.ibm.com/webapp/set2/sas/f/handbook/
getsupport.html.
If the product does not have a Mustgather document, please provide answers to
the following questions:
v What software versions were you running when the problem occurred?
v Do you have logs, traces, and messages that are related to the problem
symptoms? IBM Software Support is likely to ask for this information.
v Can you re-create the problem? If so, what steps were performed to re-create the
problem?
v Did you make any changes to the system? For example, did you make changes
to the hardware, operating system, networking software, and so on.
v Are you currently using a workaround for the problem? If so, be prepared to
explain the workaround when you report the problem.
After a Problem Management Record (PMR) is open, you can submit diagnostic
MustGather data to IBM using one of the following methods:
v FTP diagnostic data to IBM. For more information, refer to http://
www.ibm.com/support/docview.wss?rs=615&uid=swg21154524.
v If FTP is not possible, e-mail diagnostic data to techsupport@mainz.ibm.com.
You must add PMR xxxxx bbb ccc in the subject line of your e-mail. xxxxx is
your PMR number, bbb is your branch office, and ccc is your IBM country code.
Go to http://itcenter.mainz.de.ibm.com/ecurep/mail/subject.html for more
details.
Always update your PMR to indicate that data has been sent. You can update your
PMR online or by phone as described above.
The IBM System z Enterprise Development Tools & Compilers Information Center, and
its related publications, are accessibility-enabled. The accessibility features of the
information center are described at http://publib.boulder.ibm.com/infocenter/pdthelp/
v1r1/topic/com.ibm.help.doc/accessibility_info.html.
Syntax diagrams start with the word Format or the word Fragments. Each diagram
is preceded by two images. For the first image, the screen reader will say "Read
syntax diagram". The associated link leads to an accessible text diagram. When you
return to the document at the second image, the screen reader will say "Skip visual
syntax diagram" and has a link to skip around the visible diagram.
IBM may have patents or pending patent applications covering subject matter in
this document. The furnishing of this document does not give you any license to
these patents. You can send license inquiries, in writing, to:
IBM Corporation
J46A/G4
555 Bailey Avenue
San Jose, CA 95141-1003
U.S.A.
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with the local law:
Java and all Java-based trademarks and logos are trademarks of Oracle and/or its
affiliates.
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of
Microsoft Corporation in the United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Glossary 573
index A computer storage position or register, document this term is also used to refer
the contents of which identify a particular to a Dynamic Load Library (DLL).
element in a table.
logical window
initial setting A group of related debugging information
A value in effect when the user's Debug (for example, variables) that is formatted
Tool session begins. Contrast with default. so that it can be displayed in a physical
window.
interactive
Pertaining to a program or system that
M
alternately accepts input and then
responds. An interactive system is minor node
conversational; that is, a continuous In VTAM, a uniquely defined resource
dialog exists between the user and the within a major node.
system. Contrast with batch.
multitasking
I/O Input/output. A mode of operation that provides for
concurrent performance, or interleaved
L execution of two or more tasks.
Language Environment
N
An IBM software product that provides a
common run-time environment and network identifier
common run-time services for IBM high In TCP/IP, that part of the IP address that
level language compilers. defines a network. The length of the
network ID depends on the type of
library routine
network class (A, B, or C).
A routine maintained in a program
library. nonconversational
A transaction type that accepts input,
line mode
performs a task, and then ends.
An interface mode for use with a
nonprogrammable terminal that uses a nondate
single command line to accept Debug A COBOL data item that can be any of
Tool commands. the following:
line wrap v A data item whose date description
The function that automatically moves the entry does not include the DATE
display of a character string (separated FORMAT clause
from the rest of a line by a blank) to a v A literal
new line if it would otherwise overrun v A reference modification of a date field
the right margin setting.
v The result of certain arithmetic
link-edit operations that may include date field
To create a loadable computer program operands; for example, the difference
using a linkage editor. between two compatible date fields.
linkage editor The value of a nondate may or may not
A program that resolves cross-references represent a date.
between separately compiled object
modules and then assigns final addresses O
to create a single relocatable load module.
Options
listing A printout that lists the source language A choice that lets the user customize
statements of a program with all objects or parts of objects in an
preprocessor statements, includes, and application.
macros expanded.
offset The number of measuring units from an
load module arbitrary starting point to some other
A program in a form suitable for loading point.
into main storage for execution. In this
Glossary 575
that causes a program to begin execution statement
and continue until a run-time exception An instruction in a program or procedure.
occurs. If a run-time exception occurs, the
In programming languages, a language
user can use Debug Tool to analyze the
construct that represents a step in a
problem. A choice the user can make to
sequence of actions or a set of
start or resume regular execution of a
declarations.
program.
static In programming languages, pertaining to
run time
properties that can be established before
Any instant when a program is being
execution of a program; for example, the
executed.
length of a fixed-length variable is static.
run-time environment Contrast with dynamic.
A set of resources that are used to
step One statement in a computer routine. To
support the execution of a program.
cause a computer to execute one or more
run unit statements. A choice the user can make to
A group of one or more object programs execute one or more statements in the
that are run together. application being debugged.
storage
S
A unit into which recorded text can be
SBCS See single-byte character set. entered, in which it can be retained, and
from which it can be retrieved. The action
semantic error
of placing data into a storage device. A
An error in the implementation of a
storage device.
program's specifications. The semantics of
a program refer to the meaning of a subroutine
program. Unlike syntax errors, semantic A sequenced set of instructions or
errors (since they are deviations from a statements that can be used in one or
program's specifications) can be detected more computer programs at one or more
only at run time. Contrast with syntax points in a computer program.
error.
suffix area
sequence number A variable-sized column to the right of
A number that identifies the records the program source or listing statements,
within an MVS file. containing frequency counts for the first
statement or verb on each line. Debug
session variable
Tool optionally displays the suffix area in
A variable the user declares during the
the Source window. See also prefix area.
Debug Tool session by using Declarations.
syntactic analysis
single-byte character set (SBCS)
An analysis of a program done by a
A character set in which each character is
compiler to determine the structure of the
represented by a one-byte code.
program and the construction of its
Single Point of Control source statements to determine whether it
The control interface that sends is valid for a given programming
commands to one or more members of an language. See also syntax checker, syntax
IMSplex and receives command error.
responses.
syntax The rules governing the structure of a
source The HLL statements in a file that make programming language and the
up a program. construction of a statement in a
programming language.
Source window
A Debug Tool window that contains a syntax error
display of either the source code or the Any deviation from the grammar (rules)
listing of the program being debugged. of a given programming language
appearing when a compiler performs a
SPOC See Single Point of Control.
V
variable
A name used to represent a data item
whose value can be changed while the
program is running.
VTAM
See Virtual Telecommunications Access
Method.
Virtual Telecommunications Access Method
(VTAM)
IBM software that controls
communication and the flow of data in an
SNA network by providing the SNA
application programming interfaces and
SNA networking functions. An SNA
network includes subarea networking,
Advanced Peer-to-Peer Networking
Glossary 577
578 Debug Tool V13.1 User's Guide
Bibliography
Debug tool publications
Using CODE/370 wih VS COBOL II and OS PL/I, SC09-1862
You can access Debug Tool publications through the IBM System z Enterprise
Development Tool and Compliers information center. You can receive RSS feeds
about updates to the information center by following the instructions in the topic
"Subscribe to information center updates", which is in the IBM System z Enterprise
Development Tools and Compilers information center.
Debug Tool User's Guide, SC14-7600
Debug Tool Coverage Utility User's Guide and Messages, SC27-4651
Debug Tool Reference and Messages, SC27-4652
Debug Tool Reference Summary, SC14-7602
Debug Tool API User's Guide and Reference, SC27-4654
Debug Tool Customization Guide, SC14-7601
Debug Tool Program Directory, GI13-3004
COBOL and CICS Command Level Conversion Aid for OS/390 & MVS & VM:
User's Guide, SC26-9400-02
Program Directory for IBM COBOL and CICS Command Level Conversion Aid for
OS/390 & MVS & VM, GI10-5080-04
Japanese Program Directory for IBM COBOL and CICS Command Level Conversion
Aid for OS/390 & MVS & VM, GI10-6976-02
Problem Determination Tools Common Component Program Directory, GI10-8969
Problem Determination Tools for z/OS Common Component Customization Guide and
User Guide, SC19-4159
Related publications
CICS
Application Programming Guide, SC34-6231
Application Programming Primer, SC34-0674
Application Programming Reference, SC34-6232
IMS
IMS Application Programming: Database Manager, SC27-1286
IMS Application Programming: EXEC DLI Commands for CICS & IMS, SC27-1288
IMS Application Programming: Transaction Manager, SC27-1289
TSO/E
Command Reference, SA22-7782
Programming Guide, SA22-7788
System Programming Command Reference, SA22-7793
User's Guide, SA22-7794
z/OS
MVS JCL Reference, SA22-7597
MVS JCL User's Guide, SA22-7598
MVS System commands, SA22-7627
Bibliography 581
Vendor Interfaces, SA22-7568
Writing Interlanguage Communication Applications, SA22-7563
Softcopy publications
Online publications are distributed on CD-ROMs and can be ordered through your
IBM representative. Debug Tool User's Guide, Debug Tool Customization Guide, and
Debug Tool Reference and Messages are distributed on the following collection kit:
SK5T-8871
Online publications can also be downloaded from the IBM website. Visit the IBM
website for each product to find online publications for that product.
Index 585
commands file (continued) cursor commands (continued)
using session log as 119 CURSOR 176
Commands File FIND 178
in DTCN, description of 97 OPEN 275
commands file, how to create a 182 SCROLL 160, 176
commands, Debug Tool SIZE 275
COBOL compiler options in effect 290 using in Debug Tool 173
entering on the session panel 167 WINDOW ZOOM 276
entering using program function keys 173 customer support 562
order of processing 170 customizing
retrieving with RETRIEVE command 174 PF keys 273
that resemble COBOL statements 289 Profile panel 117
COMMANDSDSN, EQAOPTS command 183, 442 profile settings 277
Commarea data 98 session settings 273
Commarea offset 98 CWI, Language Environment 425
comments, inserting into command stream 287
Common pop-up window, how to enter commands in 175
common_parameters, when to use 10
compile unit 169
D
data only modules, debugging 428
general description 407
DATA parameter
name area, Debug Tool 169
restrictions on accessing COBOL data 191
qualification of, for C and C++ 335
data sets
compile units known to Debug Tool, displaying list of 209
COBOL listing 439
compiler options
PL/I listing 441
COBOL 27
PL/I source 440
how to choose, for PL/I 34
separate debug file 441
suggested 25
specifying 184
which options to use for COBOL 27
used by Debug Tool 439
compiling
data type of variable, displaying in Monitor window the 199
a C program on an HFS file system 65
DB2
a C++ program on an HFS file system 66
assembling with assembler programs 80
an OS/VS COBOL program 58
compiling with C or C++ programs 80
Enterprise PL/I program on HFS file system 64
compiling with COBOL programs 79
programs, introduction to 11
compiling with PL/I programs 79
condition
DB2 programs for debugging 79
handling of 309, 410
linking programs 81
Language Environment, C and C++ equivalents 326
using Debug Tool with 363
considerations
DB2 programs
when using the TEST run-time option 117
what files to keep 79
constants
DB2 programs, binding 82
Debug Tool interpretation of HLL 406
DB2 stored procedures
entering 287
compiling or assembling options to use 84
HLL 406
debugging modes supported 83
PL/I 313
NUMTCB 83
using in expressions, for COBOL 296
restrictions 127
constructor, stepping through 338
specifying TEST runtime options through EQADDCXT 84
Container data 98
starting Debug Tool from 153
Container name 98
using Debug Tool with 367
Container offset 98
what to do before debugging 83
continuation character 170
DBCS
for COBOL 289
using with C 284
using in full-screen 285
using with COBOL 293
continuing lines 285
using with Debug Tool commands 283
continuous display 197
DEBUG and TEST compiler option, choosing between 39, 44
copying
DEBUG compiler options 39, 45
JCL into a setup file using DTSU 124
debug mode
CREATE PROCEDURE statement, example of 84
delay 431, 434
creating
debug session
setup file using Debug Tool Utilities 123
ending 210
CRTE 51
recording 162
CSECT, debugging multiple, in one assembly 268
starting 151
CSECT, loading multiple, in one assembly 268
starting your program 151
CU(s) 92
Debug Tool
CURSOR command
C and C++ commands, interpretive subset 319
using 175, 176
COBOL commands, interpretive subset 289
cursor commands
commands, subset 406
CLOSE 275
condition handling 410
Index 587
DTCN (continued) Enterprise PL/I
defining COMMAREA 90 restrictions 317
description of 147 Enterprise PL/I, definition of xviii
description of columns 92 EQADCCXT 87
description of Session Type 96 EQADCCXT user exit 119
do not link to EQADCCXT with particular COBOL EQADDCXT
compilers 87 comparing DB2 RUNOPTS to 106
do not link to EQADCCXT with particular PL/I EQADEBUG DD statement 167
compilers 87 EQALANGX
migrating from versions earlier than V10 94 creating for LangX COBOL 72
modifying Language Environment options 98 EQALANGX file 440
using repository profile items 149 how to create 76
DTCN Profiles 545, 548 EQALANGX files, how Debug Tool locates 445, 448
DTCNFORCEFORCEIP, how Transaction Id in DTCN works EQALMPFX 539
with 96 EQALMPRM 540
DTCNFORCELOADMODID, how Transaction Id in DTCN EQALOAD 427
works with 95 EQANMDBG
DTCNFORCENETNAME, how Transaction Id in DTCN works example 146
with 96 methods for starting Debug Tool with 143
DTCNFORCETERMID, how Terminal Id in DTCN works passing parameters to 143, 145
with 93 using only EQANMDBG DD statement 145
DTCNFORCETRANID, how Transaction Id in DTCN works using only PARM 144
with 93 EQAOPTS file, format options 442
DTCNFORCEUSERID, how Transaction Id in DTCN works EQAOPTS file, where to specify, in DTCN 98
with 95 EQASET 373
DTNP 543 when to run 106
DTSC 51 EQASTART, entering command 9
DTSP Profile 545, 548 EQASYSPF 539
DTST EQAUEDAT user exit 167
syntax of 532 EQAUOPT
DTST transaction how to create with Debug Tool Utilities 113
description of storage window 530 how to create with TIM 111
modifying storage after starting 529 EQAWLCEE 110
navigating through storage window 529 EQAZLMAe 535
starting the 527 EQUATE, SET command
syntax of the 532 description 273
DWARF suboption of FORMAT compiler option, when to error numbers in Log window 209
use 39, 44 evaluating expressions
Dynamic Debug COBOL 295
attention interrupts, support for 210 HLL 405
Dynamic Debug facility, how it works 48 evaluation of expressions
C and C++ 327
examining C++ objects 339
E examples
assembler
editing
sample program for debugging 263
setup file using Debug Tool Setup Utility 123
C
elements, unsupported, for PL/I 316
sample program for debugging 241
ENABLE command 384
C and C++
enclave
assigning values to variables 321
multiple, debugging interlanguage communication
blocks and block identifiers 334
application in 423
expression evaluation 324
non-Language Environment 127
monitoring and modifying registers and storage 341
starting 417
referencing variables and setting breakpoints 333
ending
scope and visibility of objects 333
debug session 210
C++
Debug Tool within multiple enclaves 418
displaying attributes 339
entering
sample program for debugging 251
commands on session panel 167
setting breakpoints 339
file allocation statements into setup file 124
CEETEST calls, for PL/I 132
program parameters into setup file 124
CEETEST function calls, for C 130
runtime option into setup file 124
CEETEST function calls, for COBOL 131
entering long command with Command pop-up window 175
changing point of view, general 409
entering multiline commands without continuation 286
COBOL
entering PL/I statements, freeform 310
%HEX function 297
Enterprise COBOL
%STORAGE function 297
compiler options to use 72
assigning values to COBOL variables 291
F H
H constant (COBOL) 287
feedback codes, when to use 130
halted location, displaying 180
FIND command
header fields, Debug Tool session panel 158
using with windows 178
help, online
FIND command, setting boundaries with 179
for command syntax 288
finding
hexadecimal format, displaying values in 204
characters or strings 178
hexadecimal format, how to display value of variable 204
storage overwrite errors
hexadecimal format, how to monitor value of variable 205
in assembler 271
hexadecimal format, monitoring values in 205
in C 249
HFS, compiling a C program on 65
in C++ 261
HFS, compiling a C++ program on 66
in COBOL 222
HFS, compiling Enterprise PL/I program on 64
in LangX COBOL 230
highlighting, changing in Debug Tool session panel 276
in PL/I 238
history area of Memory window 181
uninitialized storage errors
history, Debug Tool command 174
in C 249
retrieving previous commands 174
in C++ 261
hooks
finding COBOL paragraph names, example of 180
compiling with 48
fixes, getting 561
compiling with, PL/I 33
FREE command
compiling without, COBOL 48
managing file allocations 207
removing from application 393, 395
freeform input, PL/I statements 310
rules for placing in C programs 43
full-screen mode
rules for placing in C++ programs 47, 48
CICS, additional terminals 50
how to choose 39, 45
continuation character, using in 285
Index 589
I JCL sample, runs Debug Tool in batch mode
JCL to create EQALANGX file 76
137
Index 591
optimized programs, compiling COBOL with NONE and PL/I (continued)
NOHOOK 31 debugging OS PL/I programs 316
optimized programs, debugging COBOL 396 finding listing 316
options module, CEEUOPT runtime 81 Enterprise, L prefix command only available with 16
OS PL/I programs, debugging 316 Enterprise, M prefix command only available with 16
OS PL/I, compiling 36 Enterprise, restrictions 317
OS PL/I, finding list for 316 expressions 313
OS/VS COBOL 225 how Debug Tool locates separate debug file 447
compiler options to use 71 how to choose compiler options for 34
restrictions 304 notes on using 284
output PLIBASE 36
C, capturing to stdout 246 possible prerequisites 35
C++, capturing to stdout 258 preparing a program for debugging 33
overloaded operator 338 QUERY LOCATION 234
overwrite errors, finding storage run-time options 121
in assembler 271 sample program for debugging 231
in C 249 session variables 310
in C++ 261 SIBMBASE 36
in COBOL 222 statements 307
in LangX COBOL 230 structures, accessing 311
in PL/I 238 TEST compiler option, what it controls 33
when to Dynamic Debug facility with 35
PL/I for MVS & VM, compiling 36
P PL/I listing, data set 441
PL/I source, data set 440
panel
PL/I, definition of xviii
header fields, session 158
PLAYBACK commands
Profile 277
introduction to 18
PANEL command (full-screen mode)
PLAYBACK BACKWARD
changing session panel colors and highlighting 276
using 190
PANEL PROFILE command 167
PLAYBACK DISABLE
paragraph trace, generating a COBOL run-time 221
using 191
PATH, how Enterprise COBOL for z/OS, Version 4,
PLAYBACK ENABLE
handles 32
using 189
performance
PLAYBACK FORWARD
enhancing Debug Tool's 80
using 190
performance, improving Debug Tool 393
PLAYBACK START
PF keys
using 190
defining 273
PLAYBACK STOP
using 173
using 191
PF4 key, using 197
PLIBASE 36
PHASEIN 543
PLITEST 134
physical
plug-ins
opening and closing windows 275
how to install 545
physical window, enlarging 177
list of available 6
PL/I 231
plug-ins for remote debugger 545, 548
AFTERALL 34
plugins 6
AFTERCICS 34
point of view, changing
AFTERMACRO 34
description 409
AFTERSQL 34
for C and C++ 336
built-in functions 314
with COBOL 299
compiler options to use to automonitor variables in
POPUP command 164
INCLUDE files while in remote debug mode 34
positioning lines at top of windows 178
compiler options to use when you want to debug
precompiling DB2 programs 79
INCLUDE files 34
preference file 97, 117
condition handling 309
preferences file 442
constants 313
customizing Debug Tool with 279
debugging a program in full-screen mode
Preferences File
displaying raw storage 236
in DTCN, description of 97
finding storage overwrite errors 238
preferences files, how to create a 165
getting a function traceback 236
prefix area
halting on line if condition is true 235
Debug Tool 169
modifying value of variable 235
Prefix area, description of 160
setting a breakpoint to halt 234
prefix commands
setting breakpoint to halt 238
prefix area on session panel 169
tracing run-time path for code compiled with
using in Debug Tool 171
TEST 237
prepare an assembler program, steps to 75
when not all parts compiled with TEST 236
Index 593
run-time options (continued) session panel (continued)
specifying the TRAP(ON) option 121 PF keys
specifying with COBOL and PL/I 121 initial settings 173
running a program 188 using 173
running in batch mode while debugging LangX COBOL 304
considerations, TEST run-time option 118 windows
running your program, introduction to 14 scrolling 176
RUNOPTS (DB2) session panel, while debugging assembler 344
comparing EQADDCXT to 106 session settings
RUNTO command changing in Debug Tool 273
using, to replay recorded statements 190 session variables
declaring, for COBOL 295
SET AUTOMONITOR ON BOTH command, how it
S works 202
SET AUTOMONITOR ON command, example 202
save breakpoints file 443
SET AUTOMONITOR ON command, how it works 201
save monitor specifications file 443
SET AUTOMONITOR ON PREVIOUS command, how it
save settings file 443
works 201
SAVEBPDNSALLOC, EQAOPTS command 444
SET commands
SAVEBPDSN, EQAOPTS command 444
SET AUTOMONITOR
SAVEBPS 443
using to record breakpoints 186
SAVESETDSN, EQAOPTS command 443
viewing output from 161
SAVESETDSNALLOC, EQAOPTS command 443
SET AUTOMONITOR ON
SAVESETS 443
monitoring values of variables 200
saving
SET DEFAULT SCROLL
breakpoints 191
using 160
monitor specifications 191
SET EQUATE
settings 191
using 273
setup file using Debug Tool Utilities 126
SET INTERCEPT
saving (automatically) settings, breakpoints, and monitor
using with C and C++ programs 328
specifications 193
SET PFKEY
saving and restoring customizations 279
using in Debug Tool 173
saving and restoring settings, how to improve performance in
SET QUALIFY
environment with multiple enclaves 195
using with COBOL 299
saving, disabling automatic of settings, breakpoints, and
using, for C and C++ 336
monitor specifications 194
SET REFRESH
scenarios
using 389
list of C, debugging 39, 41, 46
SET SCROLL DISPLAY OFF
list of C++, debugging 45
using 160
list of COBOL, debugging 27
SET WARNING
list of PL/I, debugging 34
using with PL/I 316
scope of objects in C and C++ 330
SET DEFAULT LISTINGS command 167
screen control mode, what is 50
SET EXPLICITDEBUG 429
scroll area, Debug Tool 169
SET QUALIFY
SCROLL command
with multiple enclaves 417
using 175
SET SOURCE command 166
search string, syntax of 179
set up
searching for characters or strings 178
overall steps to, debugging session 23
searching, how Debug Tool searches for 178
SET WARNING OFF, how to use 187
SELECT statement, example of 85
setting
self-modifying code, restrictions for debugging 357
line breakpoint 186
separate debug file
setting breakpoints, in C++ 338
COBOL and PL/I, how Debug Tool locates the 447
setting breakpoints, introduction to 14
separate debug file files, how Debug Tool locates 445
settings
separate debug file, attributes to use for 80
changing Debug Tool profile 277
separate debug file, data set 441
changing Debug Tool session 273
separate terminal mode, what is 50
setup file
service, when you apply to Language Environment 110
copying JCL into, using DTSU 124
session
creating, using Debug Tool Utilities 123
variables, for PL/I 310
editing, using DTSU 123
session panel
saving, using Debug Tool Utilities 126
changing colors and highlighting in 276
setup files
changing physical window layout 274
overview of 7
command line 169
SIBMBASE 36
description 157
single terminal mode, what is 50
header fields 158
size, reducing program 393
navigating 175
sizing physical windows 275
order in which Debug Tool accepts commands from 170
Index 595
TEST compiler option (continued) uninitialized storage errors, finding (continued)
debugging C++ when only a few parts are compiled in C++ 261
with 257 UNIX System Services
debugging COBOL when only a few parts are compiled compiling a C program on 65
with 218 compiling a C++ program 66
debugging LangX COBOL when only a few parts are compiling a Enterprise PL/I program on 64
compiled with 229 using Debug Tool with 399
debugging PL/I when only a few parts are compiled unsupported
with 236 HLL modules, coexistence with 414
for PL/I 33 PL/I language elements 316
PL/I, how to choose 34 UP, SCROLL command 176
specifying NUMBER option with 29 URM debugging 99
using #pragma statement to specify 43 USE file 118
versus DEBUG runtime option (COBOL) 29 User Id
TEST compiler option (C), effect of 42 in DTCN, description of 95
TEST compiler option (C++), effect of 47
TEST run-time option
as parameter on RUN subcommand 364
different ways to specify 54
V
values
example of 120
assigning to C and C++ variables 321
for CICS programs, how to specify 56
assigning to COBOL variables 291
for DB2 programs, how to specify 56
variable
for DB2 stored procedures, how to specify 57
automonitor 16
for IMS programs, how to specify 57
changing value of 17
for JES batch programs, how to specify 56
continuous display 16
for PL/I 310
displaying value of 15
for TSO programs, how to specify 56
modifying value
for UNIX System Services programs, how to specify 56
in C 245
specifying with #pragma 122
in C++ 256
suboption processing order 117
in COBOL 217
TEST suboptions, redefining at runtime 117
in PL/I 235
this pointer, in C++ 257
one-time and continuous display 16
TIM
one-time display 15
use to create TEST runtime options data set 111
using SET AUTOMONITOR ON command to monitor
trace file for DTCN Profiles or DTSP Profile 555
value of 200
trace, generating a COBOL run-time paragraph 221
value, displaying 196
traceback, COBOL routine 220
variable, displaying data type of 199
traceback, function
variables
in assembler 270
accessing program, for C and C++ 320
in C 248
accessing program, for COBOL 291
in C++ 260
assigning values to, for C and C++ 321
in PL/I 236
assigning values to, for COBOL 291
traceback, LangX COBOL routine 230
compatible attributes in multiple languages 412
tracing run-time path
displaying, for C and C++ 320
in C 248
displaying, for COBOL 292
in C++ 260
HLL 406
in COBOL 220
qualifying 407
in PL/I 237
session
Tran 92
declaring, for C and C++ 322
Transaction Id
session, for PL/I 310
in DTCN, description of 93
viewing and modifying data members in C++ 257
TRAP, Language Environment run-time option 210, 409
VS COBOL II
TRAP(ON) run-time option, specifying 121
compiler options to use 72
trigraph 284
VS COBOL II programs, additional preparation steps for 29
trigraphs
VS COBOL II programs, debugging 300
using with C 284
VS COBOL II, finding list for 300
TSO
VSAM, comparing CICS temporary storage queue with 88
starting Debug Tool using TEST run-time option 151
VTAM
TSO command
starting a debugging session through a, terminal 139
using to debug DB2 program 364
TSO, starting Debug Tool under 141
TSQ 88
W
warning, for PL/I 316
U window
description of Memory 163
uninitialized storage errors, finding
window id area, Debug Tool 169
in C 249
X
XPLINK
restriction on applications that use 359
Z
ZOOM command, how and where to use 177
zooming a window, Debug Tool 276
Index 597
598 Debug Tool V13.1 User's Guide
IBM®
Printed in USA
SC14-7600-04