Debugging Applications IMS

Software Group

Debugging IMS with Debug Tool

Sylvie Delahaye

Sylvie.Delahaye@fr.ibm.com

© 2009 IBM Corporation

Software Group

Debug Tool Overview
Provides debugging of enterprise applications
Features: – Playback support – Automonitor support for COBOL and PL/I programs – An interface to the Fault Analyzer tool – A code coverage tool – Support for identifying and converting OS/VS COBOL source programs to ANSI 85 standard COBOL – Preparation and compile facilities for programs – Commands to query, allocate, and free files
Consistent Across Languages

BATCH

IMS

TSO

CICS

DB2

USS

Web
Sphere

Application Languages COBOL, PL/I, ASSEMBLER, C/C++
Debug application in supported environments

Debug Tool

– COBOL, C, C++, PL/I, Assembler
Environments Supported

3270

GUI
RDz

– CICS, TSO, JES/Batch, IMS Including IMS/TM, DB2 Including Stored Procedures – Uses the GUI debug interface built into products such as:
• Rational Developer for SystemZ (RDz)

2

RePenser IMS - Février 2009 - Paris

1

Debugging Applications IMS

Software Group

Debug Tool Highlights
Common User Interface Across Systems And Subsystems Consistent Across Languages –COBOL (all versions), C/C++, PL/I, Assembler Environments Supported –CICS, TSO, JES/Batch, IMS including IMS/TM, DB2 Including Stored Procedures, Unix System Services (USS), WebSphere MQ Interfaces: –Terminal Interface Manager (UID) –VTAM Terminals (MFI) –Rational Developer for System z –batch
RDz MFI

3

Software Group

Process for All z/OS Debuggers (IBM and vendor):
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

4

RePenser IMS - Février 2009 - Paris

2

Debugging Applications IMS

Software Group

Debug Tool Build Process:
TEST compiler option

Compiler Program source

Link Edit

SYSDEBUG or Compiler listing

Load Module

5

Software Group

IBM Debug Tool Build Process
Debug Tool module support is integrated into all IBM compilers (COBOL (all versions), PLI, C/C++) Module support for Debug Tool is generated as part of the base compile process Debug Tool sidefile (SYSDEBUG or compiler listing) support is built internally into the load module, not at program invocation Debug Tool compiler function supports: – Compiled in Debug Hooks:
• supporting “read only” memory

– Dynamic Hooks:
• supporting production modules

6

RePenser IMS - Février 2009 - Paris

3

V3.SEPARATE.SEPARATE) TEST(ALL. If you compile a program with the TEST compiler option and specify any suboption except NONE or NOHOOK. at statement boundaries.SYM.4) Enterprise PL/1 V3.Février 2009 .SYM. 8 RePenser IMS .7 TEST(NONE. and at points in the program where program flow might change between statement boundaries (called path points).SYM) TEST(ALL.NOHOOK. Debug Tool uses information such as hooks and symbol tables to gain control of a program. you must also specify the EJPD suboption of 7 Software Group Hooks : how they work and why you need them Hooks enable you to set breakpoints. the compiler inserts hooks into your program.Paris 4 . If you want to compile your program with the OPT(STD) or OPT(FULL) compiler option.SEPARATE) TEST(NOHOOK. COBOL Enterprise COBOL V4.SOURCE) You need to have the Dynamic Debug facility installed and you might need the Authorized Debug facility installed. run the program statement-by-statement or line-by-line.1 PL/I (< Ent. Hooks can be placed at the entrances and exits of blocks.Debugging Applications IMS Software Group Choosing compiler options for debugging Compiler options affects the size of your load module and the amount of Debug Tool functionality available to you. and display information about your program. Hooks are instructions that can be inserted into a program by a compiler at compile time.

Version 2 Release 1 with APAR PQ40298 OS/VS COBOL Version 1. Version 3 COBOL for OS/390 & VM.Février 2009 .Debugging Applications IMS Software Group Symbol tables The symbol table contains descriptions of variables.4 Enterprise PL/I for z/OS. Version 4. Release 4 or later 9 Software Group Process for All z/OS Debuggers (IBM and vendor): 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 RePenser IMS . their attributes.Paris 5 .1 Enterprise COBOL for z/OS and OS/390. Debug Tool uses these descriptions when it references variables. Version 2 Release 2 COBOL for OS/390 & VM. The symbol tables can be stored in the object file of the program or in a separate debug file. Version 3 Release 5 or later High Level Assembler for MVS & VM & VSE. and their location in storage. 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: – – – – – – – Enterprise COBOL for z/OS. Release 2.

– 3270 terminal MFI or TIM 2. SET FREQUENCY ON. 12 RePenser IMS .Debugging Applications IMS Software Group Milestone Program ready for debugging. – Batch interface command file AT TERMINATION.Paris 6 . GO: LIST FREQUENCY *.Février 2009 . QUIT. Next step : how do you want to debug ? 11 Software Group Choosing a debugging mode 3 modes 1. – Eclipse terminal RDz or RDDz 3.

Debug Tool • Dual Terminal mode: Run the application in an online IMS region.Debugging Applications IMS Software Group Interface type by subsystem Subsystem TSO JES batch UNIX System Services CICS DB2 DB2 stored procedures IMS (TM and DB) with BTS TSO foreground IMS (TM and DB) with BTS batch IMS without BTS IMS DB batch IMS without BTS IMS TM * Support is for full-screen mode through a VTAM terminal only x x x x Batch mode x x Full-screen mode x x* x* x x x* x x* x* x* Remote mode x x x x x x x x x x 13 Software Group Debugging IMS applications • Run the application as it normally runs in IMS. Debug Tool connects to a VTAM terminal or workstation that you specify..-. Debug Tool connects to a terminal or workstation that you specify...-.-11 1 11 11 XX X XX XX X XX XX X XX X XX XX X XX X -... or run in batch using Batch Terminal Simulator (BTS)..-3 33 3 33 33 3 3 33 33 IMS Application Transaction IMS/TM region IMS z/OS Debug Tool RDz or VTAM terminal IMS Application Language Environment IMS BTS region z/OS WK 14 RePenser IMS .-.-.-.Février 2009 .-.-.-.Paris 7 . Debug Tool CI CS XX XX -.2 2 22 2 2 22 2 22 22 2 22 2 22 22 2 22 2 X XX X XX XX . • BTS mode: Run the application in an IMS Batch Terminal Simulator (BTS) region.-.-.

Février 2009 . How do you tell Language Environment that this program is ready for debug ? 16 Software Group Debug Tool Invocation Process Load Module SYSDEBUG or Compiler listing TEST Runtime Parameter Debug Tool Application Language Environment Preferences file Commands file 17 Log file RePenser IMS . Debugging interface selected.Paris 8 .Debugging Applications IMS Software Group Milestone Program ready for debugging.

45.Paris 9 .123.PROMPT.SEQAMOD //* where DT will look for listings //EQADEBUG DD DISP=SHR.FILE 19 RePenser IMS .EQALANGX.*.FILE //* log for debug session //INSPLOG DD SYSOUT=* //* commands file to run at the beginning of session //CMDS DD DISP=SHR. test_level Determines what high-level language conditions raised by your program cause Debug Tool to gain control of your program commands 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 Specifies the session parameter and a file that you can use to specify default settings for your debugging environment. suboptions provide you with more flexibility.TCPIP&9.PROMPT. DSN=MY.CMDS. DSN=MY.SYSDEBUG.DSN=MY.V9R1. 18 Software Group Debug Tool V9 : options in CEEOPTS //CEEOPTS DD * DLM '/*' TEST(ALL.TEST runtime option To specify how Debug Tool gains control of your application and begins a debug session.*. The simplest form of the TEST option is TEST with no suboptions specified.*.FILE // DD DISP=SHR.VTAM%USERID:PREFS) /* //* using DT terminal Interface Manager //* TEST(ALL.FILE //* 3270 interface preferences to set before session //PREFS DD DISP=SHR. summarized below.PREFER.Debugging Applications IMS Software Group Starting Debug Tool .MFI%EQBMV002:*) //* using Eclipse interface (RDz) //* TEST(ALL.DSN=DEBUG.Février 2009 . There are four types of suboptions available.COMMANDS.VTAM%USERID:*) //* using dual VTAM //* TEST(ALL.67%8003:*) //* if Debug Tool not in LINKLIST //STEPLIB DD DISP=SHR. you use the TEST run-time option.PROMPT.PROMPT. however.DSN=MY.

Adding or changing LE run-time options prior to IMS V8 requires one or more of the following – Recompile and relink the LE modules used to supply run-time options (CEEDOPT) – Stop and restart the dependent region with new/changed run-time options (CEEROPT) – Recompile and relink the application containing run-time options (CEEUPOT) CEEDOPT Systemwide Options Overridden by Dependent Region Options CEEROPT Overridden by CEEUOPT Application Linked Options 20 Software Group Dynamic LE Run-Time Options Ability to dynamically update LE run-time options – Eliminates the need to • Stop/start dependent regions • Recompile and relink application programs or LE modules – Implementation thru the “IMS Common Service Layer (CSL)” architecture • Including Operation Manager to route the new LE commands to IMS • Including the TSO Single Point Of Control (SPOC) to enter commands User-entered LE run-time options override . or application program level LE run-time options sometimes need to be changed – To collect problem identification information • Produce a dump. – CEEDOPT. or userid 21 RePenser IMS .. transaction code.. – Program (PSB) name.Paris 10 . CEEROPT.. invoke a debug tool – To change the storage options for a transaction – . lterm name. dependent region.Février 2009 ..Debugging Applications IMS Software Group Language Environment RunTime Options LE runtime options for IMS programs are set at the system.. collect trace data.. and CEEUOPT options that are not specified as non-overridable (NONOVR) Filters can be applied based on .

Debugging interface selected. Every time your application program runs.Paris 11 . Debug Tool is started. How do you tell Language Environment that this program is ready for debug ? – Oldest method ? Pass parameters in special module linked with application or region. ld O 25 m st e th e d o RePenser IMS . and is link-edited into an application program) or CEEROPT (which is an assembler module that uses the CEEXOPT macro to set region level defaults).Debugging Applications IMS Software Group Milestone Program ready for debugging. 24 Software Group Starting DT under IMS : CEEUOPT or CEEROPT You can specify your TEST runtime options by using CEEUOPT (which is an assembler module that uses the CEEXOPT macro to set application level defaults.Février 2009 .

normally Single Terminal mode. To start Debug Tool.DELETE.DELETE). Debug Tool runs in the mode defined in the TEST run-time option you supplied.NODECK' //SYSPRINT DD SYSOUT=* //SYSLIB DD DISP=SHR. // DISP=(.DSN=CEE.XREF.PROMPT. It is a good idea to link-edit the CEEUOPT module into a library and just add an INCLUDE LibraryDDname(CEEUOPT-MemberName) statement to the link-edit options when you link your application.SYSLIN.SIZE(880K.DELETE.DSN=DELAHAY.1)) //SYSIN DD * CEEUOPT CSECT CEEUOPT AMODE ANY CEEUOPT RMODE ANY CEEXOPT RPTOPTS=(ON). simply run the application.VOL=REF=*.DELETE).ADTOOLS.DELETE.(1.(1.NCAL. Once the application program has been placed in the load library (and NEWCOPY'd if required). // DISP=(.SPACE=(CYL.ASM).Février 2009 .1)) //SYSUT3 DD UNIT=(3390.SYSLIN // DD DDNAME=SYSIN //SYSLMOD DD DISP=SHR. // DCB=(RECFM=F.DELETE).Paris 12 .DISP=(.'*'.SPACE=(CYL.ASM.1)) //SYSUT2 DD UNIT=3390. 1 ld O m t es od th e 28 Software Group CEEUOPT //ASM EXEC PGM=ASMA90.PARM='OBJECT.BLKSIZE=80) //SYSUT1 DD UNIT=3390.REFR. although you could provide a primary commands file and a log file and not use a terminal at all.(1.LET.DISP=(.DELETE).SPACE=(CYL.DELETE).SPACE=(CYL. Don’t forget to remove the CEEUOPT containing your TEST run-time option when you have finished debugging your program.SYSUT2)).64K)' //SYSPRINT DD SYSOUT=* //SYSLIN DD DISP=(OLD. whenever it is run Debug Tool will be started. // PARM='RENT.Debugging Applications IMS Software Group CEEUOPT To request that Language Environment start Debug Tool every time the application is run. // DSN=*.1)).SEP=(SYSLMOD.SCEEMAC // DD DISP=SHR.1)) //SYSIN DD * NAME CEEUOPT(R) /* //* ld O m st e th e X d o 29 RePenser IMS .MACLIB //SYSLIN DD UNIT=3390.DSN=SYS1.PASS.SPACE=(CYL. TEST=(ALL.(1.SYSLIN)).ASM.LRECL=80.DELETE.LT.SEP=(SYSLIB.LIST. assemble a CEEUOPT module with an appropriate TEST run-time option.'MFI%EQBMV002:*') END /* //* //LKED EXEC PGM=IEWL.COND=(0.DELETE).LOAD //SYSUT1 DD UNIT=(3390.DISP=(.DELETE.(1.SYSUT1.

How do you tell Language Environment that this program is ready for debug ? – Oldest method ? Always valid – New method ? Pass parameters through exit 31 RePenser IMS .Février 2009 .LOAD.MAP.LET.DISP=SHR //SYSLOAD DD DISP=SHR.1)) //SYSPRINT DD SYSOUT=* //SYSLIB DD DSN=CEE.CALL.Paris 13 .LOAD //SYSLMOD DD DISP=SHR.SCEELKED.DSN=DELAHAY.Debugging Applications IMS Software Group CEEUOPT //DELDS EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD DATA DELETE DELAHAY.(1.ADTOOLS.DEBUG //SYSLIN DD * INCLUDE SYSLOAD(COBIVP) INCLUDE SYSLOAD(CEEUOPT) ENTRY COBIVP NAME COBIVP(R) /* ld O 30 m t es od th e Software Group Milestone Program ready for debugging.XREF' //SYSUT1 DD UNIT=SYSDA.DEBUG(COBIVP) PURGE SET MAXCC=0 /* //* //LINKAPP EXEC PGM=IEWL.ADTOOLS.SPACE=(CYL.DSN=DELAHAY.PARM='LIST.LOAD.ADTOOLS. Debugging interface selected.

This exit contains a copy of the Language Environment CEEBXITA user exit that is customized for IMS. Managing runtime options for IMSplex users by using Debug Tool Utilities. Specifying the TEST runtime options in a CEEUOPT (application level. or is placed in your load module. (region level).Février 2009 .Paris 14 .Debugging Applications IMS Software Group Preparing an IMS program Specify TEST run time options: Specifying the TEST runtime options in a data set. 32 Software Group The DFSBXITA user exit You can use the DFSBXITA user exit supplied by IMS. which you link-edit to your application program) or CEEROPT module. The DFSBXITA user exit either replaces the exit supplied by Language Environment in CEEBINIT. Specifying the TEST runtime options through the EQASET transaction for nonLanguage Environment assembler programs running in IMS TM. 2-3 33 RePenser IMS . which is then extracted by a customized version of the Language Environment user exit routine CEEBXITA.

Debug Tool Utilities ---------------------------More: + 0 Job Card Create Job Card image. Debug Tool User Exit Data Set Modify the data set used by user exit during program initialization. compile. 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 ------------------.Debugging Applications IMS Software Group Creating setup file for your IMS program : DTU 4 For use with the DFSBXITA exit 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. Debug Tool Setup File Manage setup files and start debug session in TSO foreground or batch. Code Coverage Measure code coverage in programs. Load Module Analyzer Analyze load modules and each CSECT in the load module. assemble or link edit program. 1 Program Preparation Convert. JCL for Batch Debugging Modify JCL to start a debugging session for batch programs.Paris 15 . Other IBM Problem Determination Tools Invoke IBM File Manager for z/OS.Février 2009 . IMS TM Setup Update Language Environment run-time options in IMS. 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). Create message region. 2 3 4 5 6 7 8 Option ===> F1=Help 36 F12=Cancel F2=Split F3=Exit F7=Backward F8=Forward F9=Swap N RePenser IMS .

After you finish making your changes. After you type in your search criteria. or modify TEST runtime options that are stored in the IMS Language Environment runtime parameter repository. To manage the items in this repository. type 1 in the Option line and press Enter. 5. 4. In the Manage IMS Programs panel (EQAPRIS). press Enter. Add a new entry. You can use wild cards (* and %) to increase the chances of a match. Copy an existing entry. You can do the following tasks in this panel: Delete an entry. hn ec T ue iq 37 EQAPRIS --------------------.Février 2009 . press PF1 to display a help panel.1 This topic describes how to add. press the PF3 repeatedly to close other panels until you reach the Manage IMS Programs panel (EQAPRIS).Debugging Applications IMS Software Group Runtime options for IMSplex users by using DTU 4. delete. If necessary. press PF3 to save your changes and close the panel that is displayed. Debug Tool Utilities uses this information to search through the IMS Language Environment runtime parameter repository and find the entries that most closely match the information you typed in. type in the IMSplex ID and optional qualifiers.Paris 16 . a table displays all the entries found in the IMS Language Environment runtime parameter repository that most closely match your search criteria. 2. From the main Debug Tool Utilities panel (EQA@PRIM).Manage IMS Programs ---------------------------Software Group 2 1 2 Manage LE Runtime Options Create Private Message Regions Option ===> F1=Help 39 F12=Cancel F2=Split F3=Exit F7=Backward F8=Forward F9=Swap N RePenser IMS . 3. In the Edit LE Runtime Options Entries in IMS panel (EQAPRIM). In the Manage LE Runtime Options in IMS panel (EQAPRI). Edit an existing entry. type 4 in the Option line and press Enter. do the following steps: 1. For more information about a command or field.

.*. IMSPlex ID .161 IMA1 I4TCB TEST(ALL. . Press Cancel or Exit command to exit. . IMSA Required. .TCPIP&9. . Command ===> F1=Help 40 F12=Cancel F2=Split F3=Exit F7=Backward F8=Forward F9=Swap N EQAPRIM ----------.3. Query qualifiers: Trancode.3. .TCPIP&9.PROMPT. .Edit LE Runtime Options Entries in IMS --. . Program . . .212.212.Manage LE Runtime Options in IMS ---------------------Software Group Press Enter to display matched entries.*. No CSL prefix IMSPlex Member. . . .Paris 17 . . . . . . Lterm . .Row 1 to 2 of 2 Software Group IMSPlex ID: IMSA Query qualifiers: Trancode: Use line command E to edit an entry IMSPlex Mbr: Program: Lterm: Userid: C to copy an entry D to delete an entry Mbr Trancode Program Lterm Userid LE runtime options IMA2 I4TCB TEST(ALL. .PROMPT. . . . Userid. .161 ******************************* Bottom of data ******************************** Command ===> F1=Help F3=Exit 41 F11=RefreshA F12=Cancel F4=New F7=Backward Scroll ===> PAGE F8=Forward F10=Refresh RePenser IMS .Février 2009 . . . . . .Debugging Applications IMS EQAPRI --------------.

Edit LE Runtime Options Entries in IMS --. . . data set name Program: Lterm: Userid: Select (/) a session type and provide parameters: / Full-screen mode Network . .MFI%EQBMV002:*) IMA2 I4TCB TEST(ALL. Terminal LU.Row 1 to 4 of 4 Software Group IMSPlex ID: IMSA Query qualifiers: Trancode: Use line command E to edit an entry IMSPlex Mbr: Program: Lterm: Userid: C to copy an entry D to delete an entry Mbr Trancode Program Lterm Userid LE runtime options IMA2 I1TCB TEST(ALL. . .PROMPT. data set name Prompt/NoPrompt/"cmd" *. * Prompt Level ==> PROMPT Preference File . . .*. .Debugging Applications IMS EQAPRIDN Software Group -------------.*.MFI%EQBMV002:*) IMA1 I4TCB TEST(ALL. .3. . DD name. .212.3. EQBMV002 Blank or VTAM Network name VTAM Terminal LU Full-screen mode using the Debug Tool Terminal Interface Manager User ID. .161 IMA1 I1TCB TEST(ALL.TCPIP&9.PROMPT. . . .Février 2009 . .Paris 18 . . .161 ******************************* Bottom of data ******************************** Command ===> F1=Help F3=Exit 43 F11=RefreshA F12=Cancel F4=New F7=Backward Scroll ===> PAGE F8=Forward F10=Refresh RePenser IMS . .TCPIP&9.Create LE Runtime Options Entry ---------------------More: + Provide subsystem information: IMSPlex ID : IMSA IMSPlex Mbr: Qualifiers: Trancode: I1TCB Select Test Options: Test Option. TEST Test Level . .212. DD name. .PROMPT. * Test/Notest All/Error/None *.PROMPT. ALL Commands File . User ID Command ===> F1=Help F2=Split F3=Exit F7=Backward F8=Forward F9=Swap N 42 F12=Cancel EQAPRIM ----------. .*.*. .

(If not cataloged) Command ===> F1=Help 47 F12=Cancel F2=Split F3=Exit F7=Backward F8=Forward F9=Swap N RePenser IMS .Paris 19 . DELAHAY . . . . .Février 2009 . . CNTL . .Debugging Applications IMS EQAPRIS --------------------. . . DTIMS01 .Edit Setup File -----------------Setup File Project Group . . . . . . (Blank or pattern for member selection list) (or existing or new member name) Other Data Set Name: Data Set Name .Manage IMS Programs ---------------------------Software Group 3 1 2 Manage LE Runtime Options Create Private Message Regions Option ===> F1=Help 46 F12=Cancel F2=Split F3=Exit F7=Backward F8=Forward F9=Swap N EQAPFORA Software Group --------.Manage Message Regions . . . DEBUG . . Member Library: . Volume Serial . . . . Type . .

.CIDG. NBA . APPLFE. Other parameters for message processing region. . SOD .DEBUG.PROCLIB(£DLIDP)' 1 DUMMY 1 'PPIMS. + 0 000 0 Y 0 N 0 00 F8=Forward F9=Swap N F2=Split F7=Backward RePenser IMS . . 000 000 000 000 specify a 1-4 character IMS subsystem ID specify 4 3-digit decimal numbers indicating classes of messages to be served specify a 1-8 character name of an application front-end routine that is called whenever a message processing program is scheduled. .Create and submit JCL for batch execution DISP SHR SHR SHR SHR SHR SHR SHR SHR SHR SHR SHR SHR F3=Exit F7=Backward F8=Forward F10=Submit Scroll ===> CSR F11=ShowDD EQAPRIP1 Software Group --------. Job type. . OVLA. . .Debugging Applications IMS EQAPFORI Software Group it Setup File 'DELAHAY. . .KCD01X00' 1 'DPIMS.EST. . Load Module Name. . TLIM. . . . . .CNTL(DTIMS01)' Batch Job Name. . 0 means no statistics are gathered. . .KCD01P00' 1 'DP000. . IMSID .BTLOAD' 5 'PPSYN. . SSM . .DBD. . . . . . LOCKMAX OBA .CIDG. . . .1. N CLASSES . . .BTLOAD' 6 'DPGEN. . PREINIT PWFI. . . . (Front-end routine is required to debug non-LE Assembler program) specify a process time statistics code (0.USERLIB' 2 'IMS710. . . . PRLD. SPIE. .LOAD' 2 'PPIMS.BMP) parameters Row 1 to 20 of 20 SYSABOUT SYSDBOUT SYSOUT SYSPRINT SYSUDUMP Command ===> F1=Help 48 F12=Cancel Seq C DD Information (DSN/Sysin/Sysout/Dummy) ***************** Top of Data ******************** 1 'IMS710. / Enter / to modify Cmd DD Name DFSRESLB DFSVSAMP IEFRDER IMS KCDDATA KCDINDX STEPLIB JMETCH26 DFSRRC00 MSG (MSG.GEN. .SPLOAD' 1 SYSOUT=* 1 SYSOUT=* 1 SYSOUT=* 1 SYSOUT=* 2 SYSOUT=* 1 SYSOUT=D Submit . . Command ===> F1=Help 49 F12=Cancel N ALTID . . . .RESLIB' 3 'CEE.PSB.LOAD' 1 'DP000. . F3=Exit . . . . . . DBLDL . OPT . . PCB . . . . More: AGN . . .Février 2009 . .PO. .Parameters for Message Processing Region -----------------Key parameters for message processing region.Paris 20 . STIMER. 2). APARM .RESLIB' 1 'SYS2. .SCEERUN' 4 'DPSYN.

For example.Paris 21 . To prepare a program by using the Language Environment exit routine. do the following tasks: 1.Février 2009 . you need to specify Environment command (. “Linking in the CEEBXITA user exit routine” 51 RePenser IMS . if the user ID is ECSVT2. How do you tell Language Environment that this program is ready for debug ? – Oldest method ? Always valid – Old method ? Pass parameters through IMS exit – New method ? Pass parameters through DT exit 50 Software Group Specifying the TEST runtime options through the Language Environment exit routine Language Environment exit routines for various environments Environment IMS TM and BTS² Batch and BTS Exit routine name EQADICXT EQADBCXT 4 Note: ² For BTS./E) with the user ID of the IO PCB. /E USERID=ECSVT2. then the Environment command is . “Editing the source code of CEEBXITA (optional)” 2. Debugging interface selected.Debugging Applications IMS Software Group Milestone Program ready for debugging.

EQAUOPTS and the default message display level is X'00'.SEQASAMP data set. The default naming pattern is &USERID.SEQAMOD data set. This token is optional. Sample assembler routine that you can edit. Each user can specify an individual TEST runtime option when debugging an application. &PGMNAME Debug Tool replaces the &PGMNAME token with the name of the main program (load module). This token is mandatory. The load modules for the three environments are in the hlq.DBGTOOL. Three different exit routines are provided. 64 Software Group Starting Debug Tool for IMS/TM programs 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 RePenser IMS .SEQASAMP data set. The sample assembler routines are in the hlq. Debug Tool provides the user exit routine in two forms: A load module that the user includes in the link-edit step of his or her application build job.Février 2009 . The load module form of these routines are in the hlq. Use this load module if you want the default naming patterns and message display level.Debugging Applications IMS Software Group Specifying the TEST runtime options through the Language Environment exit routine Debug Tool provides a customized version of the Language Environment user exit routine (CEEBXITA) to link into the application load module. Use this source code if you want naming patterns or message display levels that are different than the default values. The routine returns a TEST runtime option when called by the Language Environment initialization logic. Each program can have its own TEST runtime options.SEQAMOD data set. The assembler routines for the three environments are in the hlq. The routine extracts the TEST runtime option from a data set with a name that is constructed from a naming pattern. You can also merge this source with an existing version of CEEBXITA. The naming pattern can include the following tokens: &USERID Debug Tool replaces the &USERID token with the user ID of the current user.Paris 22 .

EQAUOPTS Debug Tool provides special LE exits. Include a special LE user exit for DT in the application load module Use DT panel 6 to identify programs and a terminal or remote GUI interface Run the IMS transaction LE runs the exit automatically If the program name is in the TEST option file.DBGTOOL.Février 2009 . 5. the exit passes a ‘TEST’parm to Language Environment (LE) to start Debug Tool 67 Software Group Option 1: exit linked into application load module 1. the exit passes a TEST parm to LE LE starts Debug Tool 2. 6.Paris 23 .Debugging Applications IMS Software Group Enabling Debug Tool panel 6 How it works: Panel 6 saves your Debug Tool specs in a TEST option data set By default: userid. 69 RePenser IMS . 4. If an exit is enabled when the program runs: – 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. 3.

or re-link of the application load module • You may prefer to remove the exit from the load module before using it in production In option 2. the exit is made available by the Systems Programmer adding a special library to STEPLIB in the IMS MPRs – Advantages: • Works automatically for Debug Tool users • No change to the compilation process 71 RePenser IMS .Paris 24 . To install it. the Sys. 4. 3. Programmer prepares a special library with the exit and adds it to the STEPLIB of the IMS MPR Use DT panel 6 to identify programs and a terminal or remote GUI Run the IMS transaction LE runs the exit automatically If the program name is in the TEST option file. 5. a special Debug Tool module is link-edited into the application load module – Advantage: • No IMS setup needed by the Systems Programmer – Disadvantages: • Requires a change to the compile process. the exit passes a TEST parm to LE LE starts Debug Tool 2. 6.Février 2009 . 70 Software Group Comparing the two ways to enable panel 6 In option 1.Debugging Applications IMS Software Group Option 2: STEPLIB to the exit 1.

I=Interactive //CEEBXITA DD DISP=SHR.SYSIN DD * INCLUDE RESLIB(DFSLI000) INCLUDE CEEBXITA NAME DFSIVP34(R) //* 73 RePenser IMS .Paris 25 . or – Option 2: The Systems Programmer can create 3 new load libraries.SRC=DFSIVA34. .V10R1 //L.Debugging Applications IMS Software Group Enabling Debug Tool panel 6 A deep-dive into the details Debug Tool provides 3 exit programs that work with panel 6: – – – – – EQADBCXT: for all batch LE applications (including IMS and DB2 batch) EQADICXT: for online IMS (IMS/TM) LE applications only EQADDCXT: for LE DB2 stored procedures only These modules reside in Debug Tool library SEQAMOD Source for the exits (in library SEQASAMP) can be customized to: • Change the naming convention for the TEST option data set • Change to “quiet” mode to reduce system log messages To enable them: – Option 1: Link-edit the appropriate version of the exit into each application load module. . //SYSLMOD DD DISP=SHR.PGMLIB.DSN=DELAHAY.MBR=DFSIVP34.1)) //SYSLIN DD DSN=&&LOADSET.Février 2009 . // SYSHQ=IMS.(5.V9R1.LOAD //*YSLMOD DD DSN=&EXEHQ.DISP=(OLD.DISP=SHR //* for debug : B=batch.BTS.DELETE) // DD DDNAME=SYSIN // PEND //******************************************************************** //* //* COMPILE AND LINK-EDIT THE CONVERSATIONAL MPP APPLICATION PROGRAM //* //DFSIVA34 EXEC PROC=COMLK.SEQAMOD(EQADICXT) //SYSPRINT DD SYSOUT=* //SYSUT1 DD UNIT=SYSDA.SPACE=(CYL.DSN=DEBUG.V9R1. 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 h c e T iq n e u Software Group Link exit for BTS ..DSN=DEBUG.SEQAMOD(EQADBCXT) //*EEBXITA DD DISP=SHR.

In TSO. assemble or link edit program. Run the transaction that will run the main program Things you need to know that are unique to your system: – How to open a 3270 terminal session or remote GUI debugger for Debug Tool on your system – How to navigate to Debug Tool in ISPF – How to navigate to and log on to your IMS/TM system 74 EQAàPRIM Software Group ------------------. It can be: • A 3270 terminal using the Debug Tool Terminal Interface Manager (TIM). Debug Tool User Exit Data Set Modify the data set used by user exit during program initialization. compile.Paris 26 . on Debug Tool panel 6 (the TEST parm data set panel): • Specify the name of the main programs to trap • Identify the debugging display device – 3. or • A Debug Tool 3270 terminal. 4 1 Program Preparation Convert.Debug Tool Utilities ---------------------------More: + 0 Job Card Create Job Card image. Create message region.Février 2009 . Load Module Analyzer Analyze load modules and each CSECT in the load module. 2 3 4 5 6 7 8 Option ===> F1=Help 75 F12=Cancel F2=Split F3=Exit F7=Backward F8=Forward F9=Swap N RePenser IMS .Debugging Applications IMS Software Group Starting Debug Tool for an IMS/TM program Steps – 1. Code Coverage Measure code coverage in programs. Other IBM Problem Determination Tools Invoke IBM File Manager for z/OS. or • Remote GUI debugging software such as RDz or RDDz – 2. IMS TM Setup Update Language Environment run-time options in IMS. JCL for Batch Debugging Modify JCL to start a debugging session for batch programs. Log on to the IMS region (if you are not already logged on) – 4. Debug Tool Setup File Manage setup files and start debug session in TSO foreground or batch. Prepare a debugging display device.

Press Enter to edit the data set. by itself or as the last character of a name) Name 1: DFSIVP34 Name 5: Name 2: Name 6: Name 3: Name 7: Name 4: Name 8: Select Test Options: Test Option Test Level Commands File Prompt Level ==> PROMPT Preference File ==> * Select (/) a session type and provide parameters: / Full-screen mode Network ==> Terminal LU ==> EQBMV007 *.Paris 27 .Debug More: + Enter test program names: (* is a valid wild card.EQAUOPTS' Volume Serial .DBGTOOL.. . command Test/Notest All/Error/None *. or Data Set Name ==> TEST ==> ALL ==> * Prompt. DDname.Edit TEST Run-time Option Data Set ------------------. 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.Debug Tool . Press Exit or Cancel to exit. . . 'DELAHAY. .Février 2009 . *.Debugging Applications IMS EQAPTOP -----. for more information. DDname. Data Set Name: Data Set Name . or Data Set Name Blank or VTAM Network name VTAM Terminal LU Full-screen mode using the Debug Tool Terminal Interface Manager User ID ==> User ID Command ===> F1=Help 77 F12=Cancel F2=Split F3=Exit F7=Backward F8=Forward F9=Swap N RePenser IMS .Manage TEST Run-time Option Data Set ------------Software Group Specify the name of a TEST run-time option data set that you want to create or edit. (If not cataloged) Command ===> F1=Help 76 F12=Cancel F2=Split F3=Exit F7=Backward F8=Forward F9=Swap N EQAPTPRM Software Group Tool . NoPrompt.

Février 2009 . Debugging interface selected.Paris 28 .Debugging Applications IMS Software Group TEST runtime option dataset 78 Software Group Milestone Program ready for debugging. How do you tell Language Environment that this program is ready for debug ? – Oldest method ? Always valid – Old method ? Pass parameters through IMS exit – New method ? Pass parameters through DT exit Specifics for batch programs 79 RePenser IMS .

Paris 29 . When you run BTS as a batch job. 80 Software Group Debugging IMS batch programs interactively by running BTS in TSO foreground If you want to debug an IMS batch program interactively. Note: If your source (C and C++) or listing (COBOL and PL/I) does not come up in Debug Tool when you launch it. by doing the following steps: 1./T command to initiate your program Include a dummy transaction in the BTS input stream Start BTS in the TSO foreground. all call traces are displayed on your TSO terminal by default./O or . Define a dummy transaction code on the . check that the source or listing file name corresponds to the MVS library name.Février 2009 . you can run BTS in the TSO foreground. 3./O command. 81 RePenser IMS . the batch mode of Debug Tool is the only mode available for use. 2.Debugging Applications IMS Software Group Debugging IMS batch programs in batch mode You can use Debug Tool to debug IMS programs in batch mode. FSS can only be turned off by specifying TSO=NO on the . Although batch mode consumes fewer resources. FSS is the default option when BTS is started in the TSO foreground. The command string can be specified as a parameter either in the TEST run-time option. When running in the TSO foreground. The debug commands must be predefined and included in one of the Debug Tool commands files. and that you have at least read access to that MVS library. and is available only when you are running BTS in the TSO foreground. or when CALL CEETEST or __ctest is used. you must know beforehand exactly which debug commands you are going to issue. or in a command string. This can be turned off by parameters on either the ./T commands.

you can only specify data for one transaction in that data set. When using FSS. Therefore.Février 2009 . if you use an input data set. A new debug session will be started automatically for the next transaction.Paris 30 . The data for the next transaction must be entered from your TSO terminal. 83 RePenser IMS .Debugging Applications IMS Software Group Debugging IMS batch programs interactively by running BTS in TSO foreground Debug Tool can only be used to debug one iteration of a transaction at a time. you must enter the /* command on your TSO terminal to terminate the BTS session. When the program terminates you must close down Debug Tool before you can view the output of the transaction. 82 Software Group Debugging IMS batch programs interactively by running BTS in TSO foreground 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.

V3R1.BTSIN(DFSVSAMP) VSAM buffers To access DB2. Type «. BTS region type ===> DLI (BMP. enter the subsystem id and the name of SDSNLOAD DB2 Subsystem ===> (leave blank to omit DB2) DB2 SDSNLOAD ===> F1=HELP F7=UP 85 F2=SPLIT F8=DOWN F3=END F9=Swap N F4=RETURN F10=LEFT F5=RFND F11=RIGHT F6=RCHANGE F12=RETRIEVE Software Group BTS input parameters BTS display some information and wait for your input.80) EOS=° EOM=$ .BTSIN(IMSIVP) ===> ===> ===> IMSBTS.V3R1. If you selected the Interactive exit.DBB or DLI) IMS system ===> IMA1 Use DBRC? ===> N (Y or N) Start DB Monitor? ===> N (Y or N . 86 RePenser IMS . IMS=10.Février 2009 ./T TC=IVTCV MBR=DFSIVP3 LANG=ASM TYPE=MSG PLC=99 SPA=80 .Debugging Applications IMS Software Group ---------------------------.Paris 31 .034. type «/FOR IVTCB» and press Enter. BTS0007I BTS V3R1 SIMULATION STARTED./E USERID=userid» and press Enter./* ENTER /FOR IVTNO AND PRESS "ENTER " TO START .not used for BMP) BTSIN file(s) ===> IMSBTS.BTS BTS execution options execution options Option ===> Select the function(s) you need: Allocate datasets before execution? ===> Y (Y or Execute BTS? ===> Y (Y or Free datasets after execution? ===> N (Y or Browse BTSLIST after execution? ===> Y (Y or You will find that BTS initialises faster if you ---------------------------- N) At least once per session N) N) N) don't continually allocate./T TC=IVTPV MBR=IVTPV LANG=PLI TYPE=MSG PLC=99 SPA=80 .1./D LTERM=IOPCB TYPE=3270-A02 SIZE=(24./T TC=IVTCB MBR=DFSIVP34 LANG=CBL TYPE=MSG PLC=99 SPA=80 . DATE=2009./E USERID=IBMUSER FSSEND=YES ./* ./* ENTER BTS COMMAND OR /FORMAT OR /* At the prompt. TIME=14:24:43. you must make sure of the userid before starting the transaction./T TC=IVTNO MBR=DFSIVP1 LANG=ASM TYPE=MSG PLC=99 . ./T TC=IVTNV MBR=DFSIVP2 LANG=ASM TYPE=MSG PLC=99 ./T TC=IVTFD MBR=DFSIVP4 LANG=ASM TYPE=IFP PLC=99 .

Février 2009 .Paris 32 . DB2 Stored Procedure and IMS / TM Press PF3 to return.Debugging Applications IMS Software Group Alternative to DTU You can have your customized panels for use with customized LE exit Already used in many locations 87 ADTDEBUG Software Group Debug Utility: Wilfried's LE Exits OPTION ===> 5 1 2 For Batch. 88 F1=HELP F7=UP F2=SPLIT F8=DOWN F3=END F9=Swap N F4=RETURN F10=LEFT F5=RFND F11=RIGHT F6=RCHANGE F12=RETRIEVE RePenser IMS . DB2 Stored Procedure and CICS For Batch.

. . ________ Batch Stepname IMS TRX .TESTPARM Debug Options: Test. . . MFI%EQBMV007 Debug files: _ Command file. . . . . DFSIVP34 Customizable Jobname . __________________________________________ Press ENTER to change parameter file PF1 HELP PF3 END COMMAND ===> F1=HELP 89 F7=UP F2=SPLIT F8=DOWN F3=END F9=Swap N F4=RETURN F10=LEFT F5=RFND F11=RIGHT F6=RCHANGE F12=RETRIEVE Software Group The three recommended methods for invoking Debug Tool for IMS DC (online) applications IMS Supplied Exit DFSBXITA Uses IMS online LE RunOpts (Cannot be used with IMS batch) DT Supplied Exit EQADICXT Uses DT TEST Run-time Option Data Set (Could also be used with IMS batch) 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 RePenser IMS . ________________________________________________________________ Debug display device: Address . .DBGTOOL. . .Paris 33 . __________________________________________ _ Preference file . __________________________________________ _ Log file. DELAHAY.Debug tool parameter file initialisation Software Group ----------------- Parameter file: UserID. . ________ Batch Jobname parameter file name Stepname. __________________________________________ _ Submit Job. DELAHAY _ File Name . . IVTCB IMS Transaction Runtime . Y Y or N Debug this programs PGM Names . .Debugging Applications IMS DBGPRIM --------. . . .Février 2009 . . .

Debugging Applications IMS Software Group Process for All z/OS Debuggers (IBM and vendor): 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 Customizable 3270 Interface 92 RePenser IMS .Février 2009 .Paris 34 .

94 RePenser IMS .Debugging Applications IMS Software Group Memory display 93 Software Group Rational Developer for System z Monitoring and changing the value of variables Breakpoints managing.Février 2009 .Paris 35 .

Paris 36 .Février 2009 .ibm.com/software/awdtools/debugtool/ 96 RePenser IMS .Debugging Applications IMS Software Group Variables VARBL1=10 95 Software Group Conclusion Debug Tool is the tool of choice to debug mainframe applications Integration with RDz Customization Debug Tool for z/OS (5655-U27) http://www.

ibm.Paris 37 .redbooks.com/infocenter/ieduasst/stgv1r0/index.boulder.Février 2009 .Debugging Applications IMS Software Group Education Assistant http://publib.com 98 RePenser IMS .jsp 97 Software Group Redbooks www.