Professional Documents
Culture Documents
Software Group
Debugging IMS
with Debug Tool
Software Group
Software Group
Software Group
Build:
– Compile and Link a z/OS load module generating support
for the interactive debugging
Invoke:
– Load the module under the control of the debugger
Execute:
– Control the execution of the module via the debugger
interface
Software Group
Program source
Load
Module
SYSDEBUG or
Compiler listing
Software Group
Software Group
Compiler options affects the size of your load module and the amount of
Debug Tool functionality available to you. Debug Tool uses information
such as hooks and symbol tables to gain control of a program, run the
program statement-by-statement or line-by-line, and display information
about your program.
COBOL TEST(NONE,SYM,SEPARATE)
Enterprise COBOL V4.1 TEST(NOHOOK,SEPARATE)
PL/I (< Ent. V3.4) TEST(ALL,SYM)
Enterprise PL/1 V3.7 TEST(ALL,NOHOOK,SYM,SEPARATE,SOURCE)
You need to have the Dynamic Debug facility installed and you might need the Authorized Debug facility installed.
If you want to compile your program with the OPT(STD) or OPT(FULL) compiler option, you must also specify the
EJPD suboption of
Software Group
Software Group
Symbol tables
The symbol tables can be stored in the object file of the program or
in a separate debug file. You can save symbol tables in a separate
debug file if you compile or assemble your programs with one of the
following compilers or assembler:
Software Group
Build:
– Compile and Link a z/OS load module generating support
for the interactive debugging
Invoke:
– Load the module under the control of the debugger
Execute:
– Control the execution of the module via the debugger
interface
10
Software Group
Milestone
11
Software Group
1. 3270 terminal
– MFI or TIM
2. Eclipse terminal
– RDz or RDDz
3. Batch interface
– command file
AT TERMINATION;
SET FREQUENCY ON;
GO:
LIST FREQUENCY *;
QUIT;
12
Software Group
TSO x x x
JES batch x x* x
UNIX System Services x* x
CICS x x x
DB2 x x x
DB2 stored procedures x* x
13
Software Group
• Run the application as it normally runs in IMS, or run in batch using Batch
Terminal Simulator (BTS).
Debug Tool
Transaction
XX XX XX X XX XX X XX XX X XX X XX XX X XX X X XX X XX XX
to a terminal or workstation
-- -- -- - -- -- - -- -- - -- - -- -- - -- - - -- - -- --
11 2 2 22 2 3 33
1 11 2 22 2 22 22 2 22 2 3 33 33
11 22 22 2 22 2 3 3 33 33
z/OS
IMS
• BTS mode:
Run the application in
an IMS Batch Terminal
Simulator (BTS) region. IMS
Debug Tool connects Debug Tool
Application
to a VTAM terminal or
RDz Language Environment
workstation that you specify. or
VTAM terminal IMS BTS region
WK z/OS
14
Software Group
Milestone
16
Software Group
Load
SYSDEBUG or Module
Compiler listing TEST
Runtime Parameter
Language Environment
Commands file
17
Software Group
18
Software Group
19
Software Group
20
Software Group
21
Software Group
Milestone
24
Software Group
o d
th
CEEUOPT (which is an assembler module that uses the CEEXOPT macro to set
application level defaults, and is link-edited into an application program) or
e
CEEROPT (which is an assembler module that uses the CEEXOPT macro to set
region level defaults).
m
Every time your application program runs, Debug Tool is started.
t
e s
ld
25
O
Software Group
1
CEEUOPT
To request that Language Environment start Debug Tool every time the
application is run, assemble a CEEUOPT module with an appropriate
TEST run-time option.
o d
th
It is a good idea to link-edit the CEEUOPT module into a library and just
add an INCLUDE LibraryDDname(CEEUOPT-MemberName) statement to
e
the link-edit options when you link your application. Once the application
program has been placed in the load library (and NEWCOPY'd if required),
t m
whenever it is run Debug Tool will be started.
Debug Tool runs in the mode defined in the TEST run-time option you
es
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.
ld
Don’t forget to remove the CEEUOPT containing your TEST run-time option
28
O
when you have finished debugging your program.
Software Group
CEEUOPT
d
//ASM EXEC PGM=ASMA90,PARM='OBJECT,NODECK'
//SYSPRINT DD SYSOUT=*
//SYSLIB DD DISP=SHR,DSN=CEE.SCEEMAC
o
// DD DISP=SHR,DSN=SYS1.MACLIB
//SYSLIN DD UNIT=3390,DISP=(,PASS,DELETE),SPACE=(CYL,(1,1)),
h
// DCB=(RECFM=F,LRECL=80,BLKSIZE=80)
//SYSUT1 DD UNIT=3390,DISP=(,DELETE,DELETE),SPACE=(CYL,(1,1))
t
//SYSUT2 DD UNIT=3390,DISP=(,DELETE,DELETE),SPACE=(CYL,(1,1))
//SYSUT3 DD UNIT=(3390,SEP=(SYSLIB,SYSUT1,SYSUT2)),
e
// DISP=(,DELETE,DELETE),SPACE=(CYL,(1,1))
//SYSIN DD *
CEEUOPT CSECT
CEEUOPT AMODE ANY
m
CEEUOPT RMODE ANY
CEEXOPT RPTOPTS=(ON), X
t
TEST=(ALL,'*',PROMPT,'MFI%EQBMV002:*')
END
/*
s
//*
//LKED EXEC PGM=IEWL,COND=(0,LT,ASM),
e
// PARM='RENT,REFR,NCAL,LET,LIST,XREF,SIZE(880K,64K)'
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DISP=(OLD,DELETE,DELETE),
d
// DSN=*.ASM.SYSLIN,VOL=REF=*.ASM.SYSLIN
l
// DD DDNAME=SYSIN
//SYSLMOD DD DISP=SHR,DSN=DELAHAY.ADTOOLS.LOAD
//SYSUT1 DD UNIT=(3390,SEP=(SYSLMOD,SYSLIN)),
O
// DISP=(,DELETE,DELETE),SPACE=(CYL,(1,1))
//SYSIN DD *
NAME CEEUOPT(R)
/*
//*
29
Software Group
CEEUOPT
//DELDS
//SYSIN
EXEC PGM=IDCAMS
//SYSPRINT DD
DD
SYSOUT=*
DATA
DELETE DELAHAY.ADTOOLS.LOAD.DEBUG(COBIVP) PURGE
o d
h
SET MAXCC=0
t
/*
//*
//LINKAPP EXEC PGM=IEWL,PARM='LIST,LET,MAP,CALL,XREF'
e
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSPRINT DD SYSOUT=*
//SYSLIB DD DSN=CEE.SCEELKED,DISP=SHR
//SYSLOAD DD DISP=SHR,DSN=DELAHAY.ADTOOLS.LOAD
m
//SYSLMOD DD DISP=SHR,DSN=DELAHAY.ADTOOLS.LOAD.DEBUG
//SYSLIN DD *
t
INCLUDE SYSLOAD(COBIVP)
INCLUDE SYSLOAD(CEEUOPT)
es
ENTRY COBIVP
NAME COBIVP(R)
/*
ld
30
O
Software Group
Milestone
31
Software Group
32
Software Group
2-3
The DFSBXITA user exit
33
Software Group
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.
35
EQAàPRIM Software
-------------------
Group Debug Tool Utilities ----------------------------
More: +
0 Job Card
Create Job Card image.
1 Program Preparation
Convert, compile, assemble or link edit program.
3 Code Coverage
Measure code coverage in programs.
4 IMS TM Setup
Update Language Environment run-time options in IMS. Create message region.
Option ===>
F1=Help
36
F2=Split F3=Exit F7=Backward F8=Forward F9=Swap N
F12=Cancel
Software Group
e
1. From the main Debug Tool Utilities panel (EQA@PRIM), type 4 in the Option line and
press Enter.
u
2. In the Manage IMS Programs panel (EQAPRIS), type 1 in the Option line and press Enter.
3. In the Manage LE Runtime Options in IMS panel (EQAPRI), type in the IMSplex ID and
iq
optional qualifiers. Debug Tool Utilities uses this information to search through the IMS
Language Environment runtime parameter repository and find the entries that most closely
n
match the information you typed in. You can use wild cards (* and %) to increase the
chances of a match. After you type in your search criteria, press Enter.
4.
c h
In the Edit LE Runtime Options Entries in IMS panel (EQAPRIM), a table displays all the
entries found in the IMS Language Environment runtime parameter repository that most
closely match your search criteria. You can do the following tasks in this panel:
e
Delete an entry.
Add a new entry.
5.
T
Edit an existing entry.
Copy an existing entry.
For more information about a command or field, press PF1 to display a help panel.
After you finish making your changes, press PF3 to save your changes and close the panel
that is displayed. If necessary, press the PF3 repeatedly to close other panels until you
reach the Manage IMS Programs panel (EQAPRIS).
37
EQAPRIS ---------------------
Software Group Manage IMS Programs ----------------------------
2
1 Manage LE Runtime Options
Option ===>
F1=Help
39
F2=Split F3=Exit F7=Backward F8=Forward F9=Swap N
F12=Cancel
EQAPRI ---------------
Software Group Manage LE Runtime Options in IMS ----------------------
IMSPlex Member. . . .
Query qualifiers:
Trancode. . . . . .
Program . . . . . .
Lterm . . . . . . .
Userid. . . . . . .
Command ===>
F1=Help
40
F2=Split F3=Exit F7=Backward F8=Forward F9=Swap N
F12=Cancel
EQAPRIM -----------
Software Group Edit LE Runtime Options Entries in IMS --- Row 1 to 2 of 2
IMSPlex ID: IMSA IMSPlex Mbr:
Query qualifiers:
Trancode: Program: Lterm: Userid:
EQAPRIDN Software
--------------
Group Create LE Runtime Options Entry ----------------------
More: +
IMSPlex ID : IMSA
IMSPlex Mbr:
Qualifiers:
Trancode: I1TCB Program: Lterm: Userid:
/ Full-screen mode
Network . . Blank or VTAM Network name
Terminal LU. . EQBMV002 VTAM Terminal LU
EQAPRIM -----------
Software Group Edit LE Runtime Options Entries in IMS --- Row 1 to 4 of 4
IMSPlex ID: IMSA IMSPlex Mbr:
Query qualifiers:
Trancode: Program: Lterm: Userid:
EQAPRIS ---------------------
Software Group Manage IMS Programs ----------------------------
3
1 Manage LE Runtime Options
Option ===>
F1=Help
46
F2=Split F3=Exit F7=Backward F8=Forward F9=Swap N
F12=Cancel
EQAPFORA Software
--------- Manage Message Regions - Edit Setup File ------------------
Group
Command ===>
F1=Help
47
F2=Split F3=Exit F7=Backward F8=Forward F9=Swap N
F12=Cancel
EQAPFORI Software
it Setup File 'DELAHAY.DEBUG.CNTL(DTIMS01)'
Group Row 1 to 20 of 20
Command ===> Submit - Create and submit JCL for batch execution Scroll ===> CSR
F1=Help
48
F3=Exit F7=Backward F8=Forward F10=Submit F11=ShowDD
F12=Cancel
EQAPRIP1 Software
--------- Parameters for Message Processing Region ------------------
Group
Key parameters for message processing region.
CLASSES . . 000 000 000 000 specify 4 3-digit decimal numbers indicating
classes of messages to be served
Software Group
Milestone
50
Software Group
Note:
² 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.
To prepare a program by using the Language Environment exit routine, do the following tasks:
1. “Editing the source code of CEEBXITA (optional)”
2. “Linking in the CEEBXITA user exit routine”
51
Software Group
64
Software Group
Debug Tool is started when you pass a TEST parm to LE when your IMS/TM
program runs
Use Debug Tool panel 6 and a supplied exit program so that a TEST parm will be
passed automatically when you run the transaction that runs the program
65
Software Group
Panel 6 saves your Debug Tool specs in a TEST option data set
By default: userid.DBGTOOL.EQAUOPTS
– It uses the IMS User ID to determine the name of the test option data
set
– The exit program reads your test option data set
– If the program name matches, the exit passes a ‘TEST’parm to
Language Environment (LE) to start Debug Tool
67
Software Group
69
Software Group
70
Software Group
71
Software Group
e
– EQADICXT: for online IMS (IMS/TM) LE applications only
– EQADDCXT: for LE DB2 stored procedures only
–
–
These modules reside in Debug Tool library SEQAMOD
q u
Source for the exits (in library SEQASAMP) can be customized to:
i
• Change the naming convention for the TEST option data set
n
• Change to “quiet” mode to reduce system log messages
To enable them:
module, or
c h
– Option 1: Link-edit the appropriate version of the exit into each application load
T e
– Option 2: The Systems Programmer can create 3 new load libraries, which can
be added to STEPLIB or JOBLIB to enable the exits
• A loadlib for batch applications containing a copy of LE module CEEBINIT linked with
exit module EQADBCXT
• A loadlib for IMS/TM applications containing a copy of LE module CEEBINIT linked
with exit module EQADICXT
• A loadlib for DB2 stored procedures containing a copy of LE module CEEPIPI linked
with exit module EQADDCXT
72
Software Group
. . .
//SYSLMOD DD DISP=SHR,DSN=DELAHAY.BTS.LOAD
//*YSLMOD DD DSN=&EXEHQ..PGMLIB,DISP=SHR
//* for debug : B=batch, I=Interactive
//CEEBXITA DD DISP=SHR,DSN=DEBUG.V9R1.SEQAMOD(EQADBCXT)
//*EEBXITA DD DISP=SHR,DSN=DEBUG.V9R1.SEQAMOD(EQADICXT)
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(5,1))
//SYSLIN DD DSN=&&LOADSET,DISP=(OLD,DELETE)
// DD DDNAME=SYSIN
// PEND
//********************************************************************
//*
//* COMPILE AND LINK-EDIT THE CONVERSATIONAL MPP APPLICATION PROGRAM
//*
//DFSIVA34 EXEC PROC=COMLK,SRC=DFSIVA34,MBR=DFSIVP34,
// SYSHQ=IMS.V10R1
//L.SYSIN DD *
INCLUDE RESLIB(DFSLI000)
INCLUDE CEEBXITA
NAME DFSIVP34(R)
//*
73
Software Group
74
EQAàPRIM Software
-------------------
Group Debug Tool Utilities ----------------------------
More: +
0 Job Card
Create Job Card image.
4
1 Program Preparation
Convert, compile, assemble or link edit program.
3 Code Coverage
Measure code coverage in programs.
4 IMS TM Setup
Update Language Environment run-time options in IMS. Create message region.
Option ===>
F1=Help
75
F2=Split F3=Exit F7=Backward F8=Forward F9=Swap N
F12=Cancel
EQAPTOP ------
Software Debug
Group Tool - Manage TEST Run-time Option Data Set -------------
Specify the name of a TEST run-time option data set that you want to
create or edit.
The data set provides a TEST run-time option for debugging application
that uses Debug Tool Language Environment user exit.
Use Help and the Debug Tool User Guide section: Preparing a program
using Debug Tool Language Environment user exit, for more information.
Command ===>
F1=Help
76
F2=Split F3=Exit F7=Backward F8=Forward F9=Swap N
F12=Cancel
EQAPTPRM Software
------ Group
Debug Tool - Edit TEST Run-time Option Data Set --------------
More: +
Enter test program names: (* is a valid wild card, by itself or as the last
character of a name)
/ Full-screen mode
Network ==> Blank or VTAM Network name
Terminal LU ==> EQBMV007 VTAM Terminal LU
Command ===>
F1=Help
77
F2=Split F3=Exit F7=Backward F8=Forward F9=Swap N
F12=Cancel
Software Group
78
Software Group
Milestone
79
Software Group
You can use Debug Tool to debug IMS programs in batch mode.
The debug commands must be predefined and included in one of the
Debug Tool commands files, or in a command string. The command string
can be specified as a parameter either in the TEST run-time option, or
when CALL CEETEST or __ctest is used.
Although batch mode consumes fewer resources, you must know
beforehand exactly which debug commands you are going to issue.
When you run BTS as a batch job, the batch mode of Debug Tool is the
only mode available for use.
80
Software Group
81
Software Group
Debug Tool can only be used to debug one iteration of a transaction at a time.
When the program terminates you must close down Debug Tool before you can
view the output of the transaction. Therefore, if you use an input data set, you can
only specify data for one transaction in that data set. The data for the next
transaction must be entered from your TSO terminal.
A new debug session will be started automatically for the next transaction. When
using FSS, you must enter the /* command on your TSO terminal to terminate the
BTS session.
82
Software Group
Unsupported BYPASS :
You can also use an alternate copy of the BTS startup CLIST with reference to
alternate libraries where you store debug-ready copies of your load modules.
83
Software Group
BTS region type ===> DLI (BMP,DBB or DLI) IMS system ===> IMA1
Use DBRC? ===> N (Y or N)
Start DB Monitor? ===> N (Y or N - not used for BMP)
85
Software Group
If you selected the Interactive exit, you must make sure of the userid before starting the transaction.
Type «./E USERID=userid» and press Enter.
86
Software Group
Alternative to DTU
87
F1=HELP
88
F2=SPLIT F3=END F4=RETURN F5=RFND F6=RCHANGE
F7=UP F8=DOWN F9=Swap N F10=LEFT F11=RIGHT F12=RETRIEVE
Parameter file:
UserID. . . DELAHAY _ File Name . DELAHAY.DBGTOOL.TESTPARM
Debug Options:
Test. . . . Y Y or N Debug this programs
PGM Names . DFSIVP34
Jobname . . ________ Batch Jobname Customizable
Stepname. . ________ Batch Stepname parameter file name
IMS TRX . . IVTCB IMS Transaction
Runtime . . ________________________________________________________________
Debug display device:
Address . . MFI%EQBMV007
Debug files:
_ Command file. . . __________________________________________
_ Preference file . __________________________________________
_ Log file. . . . . __________________________________________
_ Submit Job. . . . __________________________________________
COMMAND ===>
F1=HELP
89
F2=SPLIT F3=END F4=RETURN F5=RFND F6=RCHANGE
F7=UP F8=DOWN F9=Swap N F10=LEFT F11=RIGHT F12=RETRIEVE
Software Group
WVH Supplied Exit EQADICXT Uses WVH TEST Run-time Option Special Data Set
The method by which this Exit has been deployed
WVH=Wilfried Van Hecke means there is no need to link the Exit
to the application module !
(Could also be used with IMS batch)
Note: There should be no reason any more to use the static CEEUOPT module linked to
the IMS application program module
90
Software Group
Build:
– Compile and Link a z/OS load module generating support
for the interactive debugging
Invoke:
– Load the module under the control of the debugger
Execute:
– Control the execution of the module via the debugger
interface
91
Software Group
92
Software Group
Memory display
93
Software Group
94
Software Group
Variables
VARBL1=10
95
Software Group
Conclusion
96
Software Group
Education Assistant
http://publib.boulder.ibm.com/infocenter/ieduasst/stgv1r0/index.jsp
97
Software Group
Redbooks www.redbooks.com
98