Debug Tool GUI v11 Basic Mentor Workshop-00

March 19, 2018 | Author: Nagarajan Venkatesan | Category: Graphical User Interfaces, Ibm Db2, Debugging, Command Line Interface, System Software


Comments



Description

®IBM Software Group IBM Debug Tool GUI for z/OS Program number 5655-V50 Basic Mentor Workshop © 2009 IBM Corporation © 2010 IBM Corporation January 5, 2011 IBM trademarks The following terms are trademarks of International Business Machines Corporation in the United States, other countries, or both: AD/Cycle CICS CICS DB2 DFSORT IBM IMS IMS/ESA Language Environment MVS RACF Redbooks S/390 System/390 VisualAge VS COBOL II VTAM WebSphere z/OS zSeries 2 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation Debug Tool training sections Page 1 of 3 Introduction Starting the debugger for batch LE programs Use a graphical user interface, and 3 15 1. Debug in batch using an LE TEST option in JCL 18 2. Debug in batch using the 'User exit data set' facility in TSO 33 3. Debug in batch using the ‘User exit data set’ facility with the DTSP plug-in 52 Using Debug Tool's graphical user interface Debug perspective views and navigation 64 3 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation Debug Tool training sections Page 2 of 3 Using Debug Tool's graphical user interface (continued) Using the debugger Stepping through statements and running the program Program statement breakpoints Monitoring variables Making breakpoints conditional Watch breakpoints Program entry and exit breakpoints Ending the debugging session 86 100 114 158 163 169 179 Loading program debug files Loading sysdebug, listings, dwarf, and source files Loading LANGX files 184 188 195 Debugging CICS Applications 202 Creating and editing a DTCN profile using the GUI plug-in 205 4 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation Interface with Debug Tool using a graphical user interface TCP/IP Debug Tool Debug Tool Application Application z/OS Remote graphical interfaces are available in Rational Developer for System z and CICS Explorer It is software that can be installed on your workstation The application running on the mainframe is controlled by the same debugging engine that is used by the 3270 interface Debug Tool displays on your workstation 5 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Download CICS Explorer and the plug-ins from the IBM web site Download CICS Explorer at www.com/software/awdtools/deployment/pdtplugin 6 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .ibm.com/software/htp/cics/explorer Then download the PD Tools plug-ins at www.ibm. Definition of terms for the Debug Tool GUI Workbench The desktop environment Perspective A set of functions and capabilities The Debug Tool GUI is a perspective View A window within a perspective providing a specific capability 7 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . What features are provided by the interactive debugger? Use the debugger to: Determine why a program is producing incorrect results Locate an abending statement See program statements. and step through statements one at a time Set breakpoints at statements. programs. and conditions Run until a breakpoint is reached View and change the values of variables and storage And much more 8 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . with support for many environments Batch CICS IMS/TM DB2 stored procedure 3270 or GUI UNIX systems services 3270 or GUI 3270 or GUI 3270 or GUI 3270 or GUI Debug Tool Batch Application Batch region Debug Tool CICS Application Transaction Debug Tool IMS Application Transaction Debug Tool DB2 Stored Procedure WLM region Debug Tool Posix Application CICS region IMS/TM region z/OS W02 © 2010 IBM Corporation 9 IBM Debug Tool for z/OS V10 Basic Mentor Workshop .What kinds of applications can be debugged? One debugging engine. When the batch job step runs. then B. the debugger starts because of the trigger z/OS 10 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . or Use the Debug Tool 'User exit data set' facility The advanced training module describes how to trigger the debugger for non-LE batch programs A.Debug batch LE applications Debug batch programs while they run in batch jobs Including DB2 and IMS batch This workshop module describes two simple methods to trigger the debugger when an LE program runs in batch Code an LE 'TEST' option in the run-time JCL. Set a trigger. Submit the batch job D. The debugger displays on a Debug Tool terminal or GUI Batch Application Debug Tool Batch region C. Run the application D. The debugger displays on a CICS terminal or GUI CICS transaction Debug Tool CICS region C. the debugger starts because of the trigger z/OS 11 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . When the program runs. Use DTCN or CADP to set a trigger B. transaction ID. and others Specify where the debugger will be displayed Single terminal mode: Debug Tool and the application share one terminal Dual terminal mode: Debug Tool displays on a different CICS terminal (that you specify) than the application GUI: Debug Tool displays on GUI debugging software on your workstation CICS A.Debug CICS applications Use the Debug Tool DTCN or CADP transaction to set a trigger A plug-in is available for DTCN profiles Define the trigger attributes that identify your application using a combination of: program name. user ID. terminal ID. Debug Tool is displayed on a Debug Tool terminal or a GUI.Debug IMS/TM transaction applications IMS Online Applications (IMS/TM) Set a program trap by specifying the program name on a Debug Tool panel in TSO or the DTSP plug-in Debug Tool Dual Terminal mode: Run the application as it normally runs in an online IMS region. 3270 or remote GUI debugger CICS XXXX ---11 111 11 XXXXXXXXXXXXXXXXXXXXXXXX -----------------------22222 222222222222 22222222 XXXXXXXX -------333 33333 333333 Debug Tool IMS Application Transaction IMS/TM message processing region IMS z/OS 12 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Do lab exercise 1 Purpose: Make notes that will be needed in later exercises Estimated time: 2 minutes What to do: Turn to lab 1 in your workbook.ADLAB.ADLAB.INSTALL(LABSETUP)' The Debug Tool batch load library: '????.DTXLOAD' 13 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . and make these notes: The Lab setup command: EX '????. ADLAB.INSTALL(LABSETUP)' 14 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .Do lab exercise 2 Purpose: Create your own copies of sample lab files that you will use in the remaining exercises Estimated time: 5 minutes What you need: The command to enter in the TSO command shell: EX '????. Debug in batch using the 'User exit data set' facility in TSO 3. and 1. Debug in batch using an LE TEST option in JCL 2.Debug Tool training sections Page 1 of 3 Introduction Starting the debugger for batch LE programs Use a graphical user interface. Debug in batch using the ‘User exit data set’ facility with the DTSP plug-in Using Debug Tool's graphical user interface Debug perspective views and navigation 15 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . When the batch job step runs. The debugger displays on your TSO terminal or a GUI Batch Application Debug Tool TSO region C. then B. the debugger starts because of the trigger z/OS 16 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .Plan your debugging session for batch programs – determine how you will run the application You can debug your batch application as it runs as a batch job A. Submit the batch job D. the debugger starts because of the trigger z/OS Or you can use the 'Debug Tool setup file' online panels to run your program under TSO TSO A. Use the online panels to create a setup file and set a trigger B. The debugger displays on a Debug Tool terminal or GUI Batch Application Debug Tool Batch region C. Run the setup file D. Set a trigger. When the setup file runs your program in TSO. consider using the Debug Tool 'User exit data set' facility If it is your personal preference If you are using this method with other types of programs (non-batch). two methods are commonly used: A. coding a TEST option is the suggested method It can be somewhat simpler and easier for batch programs However. such as DB2 stored procedures or IMS transaction programs It can be simpler to use the same method for all non-CICS programs For z/OS version 1.Plan your debugging session for batch programs – select a method to set a debugging trigger Code a trigger that will cause the debugger start when you run your application Set a debugging trigger when you want to debug For debugging batch programs. Use the Debug Tool 'User exit data set' facility Typically. the TEST option is not be supported for IMS and certain other types of programs 17 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . or B. Code a Language Environment TEST option in your JCL.7 and earlier. Debug Tool training sections Page 1 of 3 Introduction Starting the debugger for batch LE programs Use a graphical user interface. Debug in batch using the 'User exit data set' facility in TSO 3. Debug in batch using the ‘User exit data set’ facility with the DTSP plug-in Using Debug Tool's graphical user interface Debug perspective views and navigation 18 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Debug in batch using an LE TEST option in JCL 2. and 1. DB2.Debug in batch using a TEST option in JCL and a graphical user interface Description A TEST(…) option is coded in the application's run-time JCL to trigger the debugger The debugger displays on GUI debugging software on your workstation This method can be used: To debug Language Environment (LE) programs running in batch jobs including programs that access IMS. or other types of databases and non-LE programs that run in the call chain under an LE program If compatible GUI debugging software is installed on your workstation Such as Rational Developer for System z. or CICS Explorer with the Debug Tool plug-in 19 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . such as the Debug Tool plug-in for CICS Explorer. or Rational plug-in for CICS Explorer.How to start Debug Tool for a batch job with an LE TEST option in JCL and a remote GUI dbl click Start GUI debugging software Start GUI debugging software on your workstation on your workstation You must have remote GUI debugging You must have remote GUI debugging software installed. or Rational Developer for System zz Developer for System 20 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . such as the Debug Tool software installed. To get the workstation TCP/IP address. click the down arrow next to the connection icon Open the Debug perspective Open the Debug perspective click Click the down arrow next Click the down arrow next to the connection icon to the connection icon Must be in "listening" mode Must be in "listening" mode to debug to debug = Listening = Listening = Not Listening = Not Listening 21 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Click Get Workstation IP… click Click "Get Workstation IP" Click "Get Workstation IP" This is the listener’s TCP/IP port number This is the listener’s TCP/IP port number (8001 in this example) (8001 in this example) 22 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . debugger. You will This is the TCP/IP address of the workstation. You will need this address and the port number to start the need this address and the port number to start the debugger. Copy by right clicking and selecting “Copy”. Copy by right clicking and selecting “Copy”.The TCP/IP address of your workstation is shown This is the TCP/IP address of the workstation. Click OK when finished Click OK when finished click 23 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . select “System z/OS” In the “Open Perspective” dialog. select “System z/OS” and click “Ok” and click “Ok” 24 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .Switch to the z/OS perspective 2 2 click 1 1 Click the “Open Perspective” Click the “Open Perspective” Open the JCL that will run theselect “Other” Open the JCL that will run theselect “Other” icon and application in batch icon and application in batch click 3 3 In the “Open Perspective” dialog. If not connected to your system. Instruction on how to set up a system Instruction on how to set up a system connection is loacted in the “z/OS connection is loacted in the “z/OS Perspective” training module Perspective” training module 25 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . connect now.Connect to the z/OS system If not connected to your system. connect now. Open the JCL member for the application to be debugged DBL click Double click the JCL member Double click the JCL member to open in the editor to open in the editor 26 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Code a TEST option in a CEEOPTS DD or as a PARM on the EXEC statement In the JCL. code a TEST option TEST option TCPIP&address%port: TCPIP&address%port: denotes a GUI denotes a GUI Code a TEST option: Code a TEST option: --on the EXEC statement. or --in a CEEOPTS DD statement in a CEEOPTS DD statement (But not both) (But not both) 27 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . code a In the JCL. or on the EXEC statement. Submit the JCL to run the batch job Right-click and select Right-click and select “Submit Job” “Submit Job” click Update with the Update with the current IP address current IP address 1 1 RT click 2 2 28 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . and the Debug Tool GUI is activated. click “OK” to view the Debug Perspective 29 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . When the step runs. the TEST option is processed. click “OK” to view the Debug Perspective appears.When the job step runs. and the Debug Tool GUI is activated. the debugger is triggered When the step runs. the TEST option is processed. click The “Confirm Perspective Switch” message The “Confirm Perspective Switch” message appears. The debugger automatically displays The batch program can The batch program can now be debugged now be debugged 30 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . or on the EXEC statement Comparing the two methods: Both are easy. but CEEOPTS can be easier because: it is simpler to cut and paste into JCL without making a syntax mistake It can be used with a JCL PROC without changing the PROC It will trigger the debugger when the first LE program runs.Choosing between the CEEOPTS DD or EXEC parm There are two ways to code a TEST option in JCL to start Debug Tool: in a CEEOPTS DD. even if it is a subprogram • but a TEST option on the EXEC statement will only trigger if the main program is an LE program 31 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Example: TEST(. (default = all conditions and abends) Command-file can be used to specify the DDname or file name of a script file containing debugger commands that will run automatically. separated by commas and a colon: TEST( test-level . The preferences file (if specified) runs before the command file (if specified). (default = display the debugger when triggered) Connection controls where the debugger displays: • VTAM%user-id: = Connect to the TIM terminal where user-id logged on • MFI%terminal-id: = Connect to the non-TIM terminal named terminal-id • TCPIP%workstation_tcpip_address%port_id = Connect to GUI debugging software such as Rational Developer for system z Preferences-file can be used to specify the DDname or file name of a script file containing debugger commands that will run automatically.. command-file .. connection : preferences-file ) Test-level is not typically coded.Coding the LE TEST option The LE TEST option has five sub-options.VTAM%USER123:) 32 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . prompt . It is used to control when the debugger will automatically stop as a program runs. Prompt is not typically coded. Debug in batch using the ‘User exit data set’ facility with the DTSP plug-in Using Debug Tool's graphical user interface Debug perspective views and navigation 33 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Debug in batch using the 'User exit data set' facility in TSO 3.Debug Tool training sections Page 1 of 3 Introduction Starting the debugger for batch LE programs Use a graphical user interface. and 1. Debug in batch using an LE TEST option in JCL 2. A special library may be required in STEPLIB or JOBLIB to enable the Debug Tool LE user exit The debugger displays on GUI debugging software on your workstation This method can be used: To debug Language Environment (LE) programs running in batch jobs including programs that access IMS. DB2. or other types of databases and non-LE programs that run in the call chain under an LE program If compatible GUI debugging software is installed on your workstation Such as Rational Developer for System z. or CICS Explorer with the Debug Tool plug-in When not to use this method: If GUI debugging workstation software is not available. use a terminal interface instead 34 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .Debug in batch using the 'user exit data set' facility and a graphical user interface Description The 'User exit data set' online panels in TSO are used to set a trigger for the debugger. the user is In this example. or Rational plug-in for CICS Explorer. the user is already logged on to TSO already logged on to TSO You must have remote GUI debugging You must have remote GUI debugging software installed. or Rational Developer for System zz Developer for System 35 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .How to start Debug Tool for a batch job with the 'User exit data set' facility and a remote GUI dbl click Start GUI debugging software Start GUI debugging software on your workstation on your workstation In this example. such as the Debug Tool plug-in for CICS Explorer. such as the Debug Tool software installed. To get the workstation TCP/IP address. click the down arrow next to the connection icon Open the Debug perspective Open the Debug perspective click Click the down arrow next Click the down arrow next to the connection icon to the connection icon = Listening = Listening Must be in "listening" mode Must be in "listening" mode = Not Listening = Not Listening 36 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . (8001 in this example) (8001 in this example) 37 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .Click Get Workstation IP… click Click "Get Workstation IP" Click "Get Workstation IP" This is the listener’s TCP/IP port number. This is the listener’s TCP/IP port number. The TCP/IP address of your workstation is shown click This is the TCP/IP address of the workstation. This is the TCP/IP address of the workstation. You will need this address and the port You will need this address and the port number to start the debugger. number to start the debugger. click 38 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Navigate to the Debug Tool Utilities menu in TSO Follow the menus on your system to Follow the menus on your system to navigate to the Debug Tool panels navigate to the Debug Tool panels 39 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Select the Debug Tool user exit data set utility option from the menu Enter 40 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . or ififa different user ID is needed otherwise. or a different user ID is needed IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation 41 .Specify the name of the Debug Tool user exit data set Specify the correct name of your Specify the correct name of your user option data set user option data set Enter Use the default file name unless instructed Use the default file name unless instructed otherwise. If the Debug Tool user exit data set does not already exist. this allocation panel is displayed Use the default settings. unless Use the default settings. unless required by your system required by your system Enter 42 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Specify one or more program names * ==any program * any program Specify the names of main programs that Specify the names of main programs that should trigger the debugger when they run should trigger the debugger when they run Specify the Specify the debugging profile debugging profile 43 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Specify the name of one or more main programs that will trigger the debugger when they run Specify the names of main programs that Specify the names of main programs that should trigger the debugger when they run should trigger the debugger when they run F8 Specify the Specify the debugging profile debugging profile 44 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Specify the debugging interface and connection information Select the Remote Select the Remote debug mode option debug mode option When itittriggers. the When triggers. the debugger will connect to the debugger will connect to the workstation at this address workstation at this address Specify the Specify the debugging profile debugging profile Enter 45 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The user exit data set was updated by pressing Enter F3 F3 F3 46 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The name of the library will be provided by your system programmer. you Depending on how your program was linked. 47 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . you may need to add a special Debug Tool library to may need to add a special Debug Tool library to STEPLIB or JOBLIB.Next. open the JCL that will run the program in batch If needed. be provided by your system programmer. The name of the library will STEPLIB or JOBLIB. add a special library to STEPLIB or library to STEPLIB or JOBLIB JOBLIB Depending on how your program was linked. add a special If needed. Submit the JCL to run the batch job Submit the job Submit the job Enter 48 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . the debugger is triggered When the step runs. the Debug Tool LE user exit is invoked. If the main program The exit opens your user exit data set. the Debug Tool LE user exit is invoked. If the main program matches any of the program entries in the profile. The exit opens your user exit data set.When the job step runs. When the step runs. the matches any of the program entries in the profile. the debugger is triggered and is displayed in the GUI debugger is triggered and is displayed in the GUI Select the GUI Select the GUI click 49 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The debugger automatically displays The batch program The batch program can be debugged can be debugged from the GUI from the GUI And you can click your And you can click your TSO terminal to continue TSO terminal to continue working in TSO working in TSO 50 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . DBGTOOL.How the Debug Tool user exit data set facility works How it works: The user exit data set utility saves your debugging profile in a 'user exit data set' By default. the exit passes a TEST option to LE to start the debugger 51 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . the naming convention is: user-ID. If an exit is enabled when the program runs: It uses the user ID to determine the name of your data set The exit reads your user option data set If the main program name matches any of the programs in the profile.EQAUOPTS The system programmer can customize the naming convention on your system. If that is the case: • You need to learn the naming convention • Ensure that you name your user exit data set correctly Debug Tool provides special LE exits. and 1. Debug in batch using the ‘User exit data set’ facility with the DTSP plug-in Using Debug Tool's graphical user interface Debug perspective views and navigation 52 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Debug in batch using an LE TEST option in JCL 2. Debug in batch using the 'User exit data set' facility in TSO 3.Debug Tool training sections Page 1 of 3 Introduction Starting the debugger for batch LE programs Use a graphical user interface. Once the DTSP plug-in is installed. access the view by opening the “Other” access the view by opening the “Other” view menu view menu 53 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . show the DTSP Profiles View click Once the DTSP plug-in is installed.In CICS Explorer. Select the DTCN profiles view dbl click Select the “DTSP Select the “DTSP Profiles” view Profiles” view 54 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Manage Test Runtime options datasets The “DTSP Profiles” view is The “DTSP Profiles” view is displayed near the “Debug displayed near the “Debug Console” view Console” view “Right click” actions: Create – begin wizard driven profile creation Refresh – Reload the profiles list Preferences – set system connection information 55 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . right click and select “Create” right click and select “Create” 56 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .Create a new DTSP Profile RT click click 1 1 2 2 In the “DTSP Profiles” view. In the “DTSP Profiles” view. Check the z/OS system connection settings click 57 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The z/OS system connection settings click click System connection settings Host Name – TCP/IP address of the z/OS system Port Number – Port number of the z/OS system set up for CICS TCP/IP service User ID / Password – Used to sign on to the z/OS system Profile Name Pattern – Naming pattern that matches the default naming pattern for the EQUAOPTS dataset contain a combination of “&userid” and “&pgmid” 58 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . create or edit. and click “Next” edit. and click “Next” click 59 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . create or Choose the action.Build a DTSP profile Choose the action. Enter the DTSP profile information Add up to 8 load Add up to 8 load modules modules Debugging profile Debugging profile information information click 60 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . DTSP profile added to the list The EQUAOPTS debugging profile is The EQUAOPTS debugging profile is added to the list added to the list 61 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Open the JCL that will run the program in batch Opening the EQUAOPTS debugging Opening the EQUAOPTS debugging profile shows the parameters that were profile shows the parameters that were added from the DTSP profile builder added from the DTSP profile builder 62 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Do lab exercise 3 Purpose: Run a program by submitting a batch job Start the debugger on the Debug Tool GUI when the batch job runs Estimated time: 20 minutes What you need: CICS Explorer or RDz installed on your workstation The Debug Tool GUI plugin installed 63 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Debug in batch using the 'User exit data set' facility in TSO 3. Debug in batch using the ‘User exit data set’ facility with the DTSP plug-in Using Debug Tool's graphical user interface Debug perspective views and navigation 64 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Debug in batch using an LE TEST option in JCL 2. and 1.Debug Tool training sections Page 1 of 3 Introduction Starting the debugger for batch LE programs Use a graphical user interface. Debug perspective Debug view Debug view Monitors. listings… views listings… views Source view Source view Debug console Debug console 65 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Monitors. breakpoints. breakpoints. or stacked with other views in aatabbed notebook views in tabbed notebook 66 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . or stacked with other Can appear by itself.Display a view click You can display a view You can display a view by clicking on it's tab by clicking on it's tab Views Views ••Support editors and provide ways to navigate Support editors and provide ways to navigate your Workbench your Workbench ••Can appear by itself. Result of clicking a view’s tab 67 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Resizing views dbl click You can resize panes You can resize panes by dragging the borders by dragging the borders You can expand a view by You can expand a view by double-clicking on it's tab double-clicking on it's tab 68 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Full screen view window dbl click You can reduce an expanded You can reduce an expanded view by double-clicking it's tab view by double-clicking it's tab 69 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Drag a view to another pane drag You can move a view You can move a view to another pane by to another pane by dragging it's tab dragging it's tab 70 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Relocated tab 71 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Restore the default view configuration click You can reset the windows to You can reset the windows to their default position with their default position with Window -> Reset Perspective Window -> Reset Perspective 72 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Reset perspective result click 73 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Reset perspective result 74 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The Source view Source view Displays program source The next statement that will run is highlighted Set and remove statement breakpoints Right click to display view action menu 75 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The Debug view Debug view Controls running and terminating the program Use step controls to step through the program line by line Retrieve the workstation IP address View the current program stack The Debug view shows The Debug view shows currently running programs currently running programs 76 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . but step but step over a CALL over a CALL Step: run one Step: run one statement statement Animated Step: Animated Step: Steps into the Steps into the program program automatically at a automatically at a rate you specify rate you specify 77 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . statement.Debug view action bar buttons Resume: Run Resume: Run the program to the program to the next the next breakpoint or breakpoint or to the end to the end Terminate: Terminate: End the End the program program Disconnect: Disconnect: from the from the debug engine debug engine Step Return: Step Return: run until run until return from return from subprogram subprogram Step Over: Step Over: run one run one statement. statement. entry. load.The Breakpoints view Breakpoints view Lists breakpoints Set address. and watch breakpoints Delete breakpoints Enable and disable breakpoints Right-click to open menu Right-click to open menu driven breakpoint builder driven breakpoint builder 78 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . decimal) Filter local variables (all. current. previous.The Variables view Variables view Displays variables associated with the program selected in the debug view Monitor local variables and memory Change representation (hex. language based criteria) 79 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . decimal) Change a variable value 80 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .The Monitors view Monitors view Shows variables and expressions that you have selected Add or remove a variable or expression to the monitor Change representation (hex. The Registers view Registers view Lists register values Change a register value Add a register group 81 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation The Memory view Memory view View and modify memory Add / remove memory monitor Contains two panes -- the Memory Monitors pane and the Memory Renderings pane 82 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation The Modules view Modules view Displays a list of modules loaded while running your application Expand items to see compile units, files, and functions Double-click source file nodes to open source in the editor 83 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation The Debug Console Debug Console Issue commands to the debug engine View messages from the engine and commands 84 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation The Debug Console Debug Console commands Review available commands Retrieve a complete list of Retrieve a complete list of commands with CTRL + SHIFT commands with CTRL + SHIFT CTRL + SHIFT click IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation 85 . and source files Loading LANGX files Debugging CICS Applications Creating and editing a DTCN profile using the GUI plug-in 86 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . listings.Debug Tool training sections Page 2 of 3 Using Debug Tool's graphical user interface (continued) Using the debugger Stepping through statements and running the program Program statement breakpoints Monitoring variables Making breakpoints conditional Watch breakpoints Program entry and exit breakpoints Ending the debugging session Loading program debug files Loading sysdebug. dwarf. The debugger starts at the top of the program The program is not yet initialized The program is not yet initialized 87 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Use the “Step-into” button to run one statement at a time click Click the “Step-into” Click the “Step-into” button button The current position The current position Hint: F5 is the hotkey Hint: F5 is the hotkey for “Step-into” for “Step-into” 88 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . “Step-into” again click Click the “Step-into” Click the “Step-into” button button The new current position The new current position 89 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . After stepping The new current position The new current position 90 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . enter the To search for text.Search for text in the source code To search for text. enter the text string and click OK text string and click OK click 2 2 RT click 3 3 click 1 1 91 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . the text string If found. the text string is highlighted is highlighted 92 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .Result of text search If found. Scrolling in a window SCROLLING Use the scroll bar to navigate within a view Click and drag. or click arrows drag 93 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Reset the active source line dbl click Reset the source view to the current Reset the source view to the current line by clicking the program name line by clicking the program name 94 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Set a breakpoint in the source view Double click to set Double click to set aabreakpoint at breakpoint at statement 258 statement 258 dbl click Scroll down to line 258 Scroll down to line 258 95 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Click the “Resume” button to run the program click The breakpoint is also The breakpoint is also displayed in the displayed in the Breakpoints view Breakpoints view A breakpoint was set A breakpoint was set at statement 258 at statement 258 96 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Result of clicking the “Resume” button The program ran until it reached a breakpoint 97 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Right click on a line and select “Run To Location” to run the program until it reaches the statement “Run-to” line 275 “Run-to” line 275 1 1 RT click click 2 2 W02 © 2010 IBM Corporation 98 IBM Debug Tool for z/OS V10 Basic Mentor Workshop . Result of the “Run To Location” The program ran until ititreached The program ran until reached the RUNTO location the RUNTO location 99 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Debug Tool training sections Page 2 of 3 Using Debug Tool's graphical user interface (continued) Using the debugger Stepping through statements and running the program Program statement breakpoints Monitoring variables Making breakpoints conditional Watch breakpoints Program entry and exit breakpoints Ending the debugging session Loading program debug files Loading sysdebug. dwarf. listings. and source files Loading LANGX files Debugging CICS Applications Creating and editing a DTCN profile using the GUI plug-in 100 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . or with the Breakpoints view menu 2 2 click RT click 1 1 dbl click 101 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .Add breakpoints by double clicking in the source view. The breakpoints view pop-up menu gives options for setting breakpoints The breakpoint set at statement 258 is displayed The breakpoint set at statement 258 is displayed Right click and select additional breakpoints to Right click and select additional breakpoints to create create 1 1 RT click click 2 2 102 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Specify line-number to set a statement breakpoint click Indicate the statement where you Indicate the statement where you want to set aabreakpoint want to set breakpoint Example expression: Example expression: CUST-ID = '22004' CUST-ID = '22004' click W02 © 2010 IBM Corporation 103 IBM Debug Tool for z/OS V10 Basic Mentor Workshop . The breakpoint was set at the statement 104 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The Resume button or function key runs the program F8 from the keyboard has the same F8 from the keyboard has the same function as the Resume button function as the Resume button F8 105 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Statement 312 will be the next statement.The program ran until it reached a breakpoint The highlighted line indicates the current The highlighted line indicates the current statement. Statement 312 will be the next statement to run statement to run 106 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Double click a breakpoint marker to clear a statement breakpoint Statement breakpoints have been Statement breakpoints have been set at lines 314 and 316 set at lines 314 and 316 dbl click Remove aastatement Remove statement breakpoint by double clicking breakpoint by double clicking the breakpoint indicator the breakpoint indicator IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation 107 . Result of double clicking a breakpoint marker The breakpoint at 316 was cleared The breakpoint at 316 was cleared 108 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Right click and select “remove” to clear a statement breakpoint RT click 1 1 2 2 click 109 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The statement breakpoint is cleared from the source and breakpoints views The breakpoint at 312 was cleared The breakpoint at 312 was cleared 110 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Select a breakpoint and click the “Remove” button The breakpoint at 314 was cleared The breakpoint at 314 was cleared click The selected breakpoint will be removed The selected breakpoint will be removed when the “Remove” button is pressed when the “Remove” button is pressed 111 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Result of clicking the “Remove” button The breakpoint at 314 was removed The breakpoint at 314 was removed 112 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Disable a breakpoint click Disable aabreakpoint by Disable breakpoint by un-checking the box un-checking the box 113 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . listings. dwarf.Debug Tool training sections Page 2 of 3 Using Debug Tool's graphical user interface (continued) Using the debugger Stepping through statements and running the program Program statement breakpoints Monitoring variables Making breakpoints conditional Watch breakpoints Program entry and exit breakpoints Ending the debugging session Loading program debug files Loading sysdebug. and source files Loading LANGX files Debugging CICS Applications Creating and editing a DTCN profile using the GUI plug-in 114 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Hover over a variable to see it's value The hover feature: hold the The hover feature: hold the cursor (no click) over a cursor (no click) over a variable in the source view. variable in the source view. and the value is displayed! and the value is displayed! Note: This option is can be Note: This option is can be activated in the user preferences activated in the user preferences 115 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The Variables view shows program variables. and optionally variables referenced by the current statement click Step Step Variables referenced by the current statement Variables referenced by the current statement can be displayed in the variables view can be displayed in the variables view 116 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The variables view can display variables referenced by the current statement 117 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .After a Step. Select “Automonitor Previous” to display variables from both the current and previous statements 1 1 RT click click 2 2 118 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Automonitor Previous displays variables from both the current and previous statements click Step Step Previous Previous Current Current 119 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation After a step. The Automonitor refreshes the display as you step and run The yellow highlighting means the The yellow highlighting means the value has changed while in the value has changed while in the variables window variables window The Automonitor Previous option The Automonitor Previous option displays results automatically as displays results automatically as you step through aaprogram you step through program 120 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation Select the COBOL Working-Storage Section to view all of the Working-Storage variables 1 1 RT click click 2 2 121 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation Result of adding the COBOL working-storage section to the variables view DBL click Double click the tab Double click the tab to expand the view to expand the view The working storage The working storage starts here starts here 122 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation Showing all working-storage variables click Expand aasection by Expand section by clicking the “+” clicking the “+” 123 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Showing all working-storage variables DBL click Double click the tab Double click the tab to shrink the view to shrink the view 124 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Changing a variable value Right click and select Right click and select “Change Value” “Change Value” 1 1 RT click click 2 2 125 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Change the value Enter in the new Enter in the new value in the text box value in the text box 1 1 click 2 2 126 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The value was changed The value has now been The value has now been changed for the session changed for the session 127 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Control + F searches for text in a window Select the Select the source view source view click CTRL + F The selected view The selected view is searched is searched 128 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . After repeated CTRL + Finds 129 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Display the monitors view click 130 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Add a variable to the monitors view Right click the variable after Right click the variable after highlighting highlighting 1 1 RT click click 2 2 Tip: Use the Find action to locate Tip: Use the Find action to locate variables in the source variables in the source 131 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Result of the "Monitor Expression" Monitor was added Monitor was added 132 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . After adding more variables to the monitor Monitors were added Monitors were added 133 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Clearing a variable from the monitor 1 1 RT click click 2 2 134 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Result of “Remove” action – the monitored variable was cleared 135 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Remove multiple items from the monitor Select multiple items by Select multiple items by clicking and holding down clicking and holding down the Control key the Control key Remove button Remove button click click CTRL + click 1 1 2 2 3 3 136 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Result of a clearing multiple items from the monitor Monitors remain Monitors remain active until you active until you remove them remove them 137 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Select and double-click to add a variable to the monitor DBL click 138 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Result of double-click a variable Monitors remain Monitors remain active until you active until you clear them clear them Double-click to monitor is an option setting Double-click to monitor is an option setting in Window > Preferences > Run/Debug > in Window > Preferences > Run/Debug > Compiled Debug Compiled Debug 139 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Add a variable to the monitor with the “Monitor Expression” button Monitor Expression Monitor Expression button button click 1 1 Highlight the variable Highlight the variable you want to monitor you want to monitor 2 2 click W02 © 2010 IBM Corporation 140 IBM Debug Tool for z/OS V10 Basic Mentor Workshop . Result of using the Monitor Expression button Monitors remain Monitors remain active until you active until you clear them clear them 141 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Overtype the value of a monitored item to change it 1 1 DBL click Change the value of Change the value of the variable the variable 2 2 click W02 © 2010 IBM Corporation 142 IBM Debug Tool for z/OS V10 Basic Mentor Workshop The value of a variable was changed 143 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation Monitoring group variables Add CUST-REC as aaMonitored Add CUST-REC as Monitored Variable using one of the methods Variable using one of the methods click Group variables are indicated by Group variables are indicated by the “+” symbol. Click ititto expand the “+” symbol. Click to expand the variable. the variable. 144 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation Expanded group variable 145 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation Collapse the group variable click Click the “-” to collapse Click the “-” to collapse the group variable. the group variable. 146 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Collapsed the group variable The group variable can be The group variable can be expanded or collapsed any time expanded or collapsed any time 147 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . “Set auto on Both” command Enter the “set auto on both” Enter the “set auto on both” command in the Debug Console command in the Debug Console Enter 148 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . "Auto monitor" variables display in the monitors view click Click “Step” Click “Step” Previous Previous Current Current The “set auto on both” command The “set auto on both” command turns on the auto monitor and turns on the auto monitor and displays ititin the monitors view displays in the monitors view 149 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Result of step with “Set Auto On Both” Previous Previous Current Current 150 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Move the monitors view Click + drag Drag and drop the Drag and drop the Monitors view to move itit Monitors view to move 151 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . An example of using the variables and monitors views together COBOL working COBOL working storage section storage section Selected variables Selected variables Auto monitor Auto monitor 152 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Another example of using the monitors and variables view in tandem Auto monitor Auto monitor Selected variables Selected variables 153 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Add a monitored variable to the memory monitor Add aavariable to the memory Add variable to the memory monitor by right clicking and monitor by right clicking and selecting aaformat selecting format 1 1 RT click click 2 2 154 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The variable is displayed in the selected format in the Memory view 155 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Variables view Displays information about the variables associated with the stack frame selected in the Debug view Actions in the Variables view Filter locals All Automonitor current Automonitor previous COBOL sections Monitor local variables Monitor memory Change representation Change value Find (selecting from a list of variables) 156 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . then type in the variable / expression SET AUTO ON or SET AUTO ON BOTH debug console commands Display the auto monitor in the monitors view Actions in the Monitors view Add an expression to the monitor Remove an expression from the monitor Change a value Change representation 157 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .Monitors view The Monitors view shows variables and expressions that you have selected From the Source view Highlight the variable Right Click Select Monitor From the Menu Monitors Monitor Expression then type in the variable / expression From the Source view Right click a variable. then select Monitor Local Variable From the Monitors view Right click in the window. then select Monitor Expression. then select Monitor Expression From the Variables view Right click a variable. Debug Tool training sections Page 2 of 3 Using Debug Tool's graphical user interface (continued) Using the debugger Stepping through statements and running the program Program statement breakpoints Monitoring variables Making breakpoints conditional Watch breakpoints Program entry and exit breakpoints Ending the debugging session Loading program debug files Loading sysdebug. listings. and source files Loading LANGX files Debugging CICS Applications Creating and editing a DTCN profile using the GUI plug-in 158 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . dwarf. Begin by creating a breakpoint 1 1 RT click click 2 2 159 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Specify an expression to set a conditional breakpoint 1 1 click Breakpoint is set for statement 404. only when CUST-ID = ‘11004’ only when CUST-ID = ‘11004’ 2 2 click © 2010 IBM Corporation 160 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 . Breakpoint is set for statement 404. Run the program click Indicates that the Indicates that the breakpoint is conditional breakpoint is conditional Resume to run the program Resume to run the program until the breakpoint is triggered until the breakpoint is triggered 161 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The program stopped the next time it reached statement 404 and the condition was true Adding CUST-ID to the monitor Adding CUST-ID to the monitor allows the value to be shown allows the value to be shown 162 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Debug Tool training sections Page 2 of 3 Using Debug Tool's graphical user interface (continued) Using the debugger Stepping through statements and running the program Program statement breakpoints Monitoring variables Making breakpoints conditional Watch breakpoints Program entry and exit breakpoints Ending the debugging session Loading program debug files Loading sysdebug. listings. dwarf. and source files Loading LANGX files Debugging CICS Applications Creating and editing a DTCN profile using the GUI plug-in 163 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Create a “Watch” breakpoint 1 1 RT click click 2 2 164 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . A Watch breakpoint triggers when a specified variable changes Specify the variable Specify the variable 1 1 click 2 2 click © 2010 IBM Corporation 165 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 . Watch breakpoint for variable NUM-CUSTFILE-RECS has been added Click the Variables tab to view the Click the Variables tab to view the variable value variable value 166 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Run the program click Click “Resume” to run until Click “Resume” to run until the breakpoint is triggered the breakpoint is triggered The current value of The current value of the variable is 11 the variable is 167 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The watch breakpoint triggered when the variable changed The breakpoint triggered when The breakpoint triggered when the variable value changed the variable value changed 168 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . dwarf.Debug Tool training sections Page 2 of 3 Using Debug Tool's graphical user interface (continued) Using the debugger Stepping through statements and running the program Program statement breakpoints Monitoring variables Making breakpoints conditional Watch breakpoints Program entry and exit breakpoints Ending the debugging session Loading program debug files Loading sysdebug. listings. and source files Loading LANGX files Debugging CICS Applications Creating and editing a DTCN profile using the GUI plug-in 169 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . You can step into a subprogram or function click Step-into Step-into 170 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . After stepping into a subprogram Step through the program Step through the program click SAM2 is added to the program stack SAM2 is added to the program stack The location is at SAM2 initialization The location is at SAM2 initialization 171 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . You can STEP out of a subprogram or function Step out of the program Step out of the program click 172 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . and you now back in SAM1 SAM2 returned. and you now back in SAM1 The Source view shows SAM1 code The Source view shows SAM1 code 173 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .Returned to the calling program SAM2 returned. Create an entry breakpoint 1 1 RT click click 2 2 174 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Create an entry breakpoint 1 1 click Fill in the Function or Entry point name Fill in the Function or Entry point name 2 2 click © 2010 IBM Corporation 175 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 . Create an entry breakpoint click Click “Resume” to run the Click “Resume” to run the program until the breakpoint is program until the breakpoint is triggered triggered The entry breakpoint has been added The entry breakpoint has been added Deferred: The breakpoint is deferred Deferred: The breakpoint is deferred until the source is loaded until the source is loaded 176 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . After stopping at the entry breakpoint The program stopped at the entry The program stopped at the entry to SAM3 to SAM3 177 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . the entered program must be compiled for debugging for the entry breakpoint to trigger • Exceptions include debugging in disassembly mode Defer the breakpoint if the program is not already loaded 178 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .Entry and exit breakpoints Entry breakpoint Will stop when a named subprogram is entered with a subsequent Resume or Run-to-Location Another option: Stop at all function entries sets an entry breakpoint for all programs Right-click the program in the debug view to see this option Considerations: With most compilers. and source files Loading LANGX files Debugging CICS Applications Creating and editing a DTCN profile using the GUI plug-in 179 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .Debug Tool training sections Page 2 of 3 Using Debug Tool's graphical user interface (continued) Using the debugger Stepping through statements and running the program Program statement breakpoints Monitoring variables Making breakpoints conditional Watch breakpoints Program entry and exit breakpoints Ending the debugging session Loading program debug files Loading sysdebug. dwarf. listings. Tip: CTRL+F2 is the shortcut Tip: CTRL+F2 is the shortcut Disconnect: Disconnect Disconnect: Disconnect Debug Tool from the Debug Tool from the application. 180 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . the debugger. termination of the application. RC=0 is returned to the environment. environment. No more program statements No more program statements run.Termination action buttons Immediately terminate the application Immediately terminate the application using action buttons using action buttons Terminate: Immediate Terminate: Immediate termination of the application. The program continues to run from the continues to run from the current location without current location without the debugger. RC=0 is returned to the run. The program application. Click the “Terminate” button click Click the “Terminate” button Click the “Terminate” button CTRL+F2 is the hotkey CTRL+F2 is the hotkey 181 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The debugging session ended 182 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Right click in the Right click in the Debug view Debug view Consider using this option to: Consider using this option to: ••Capture the abend with IBM Fault Capture the abend with IBM Fault Analyzer for z/OS (if installed) Analyzer for z/OS (if installed) ••Avoid running subsequent steps in Avoid running subsequent steps in a multi-step job a multi-step job ••Roll back database updates Roll back database updates 1 1 right click Terminate Terminate and abend and abend 2 2 click W02 © 2010 IBM Corporation 183 IBM Debug Tool for z/OS V10 Basic Mentor Workshop .Force an immediate termination with abend Terminate and abend Terminates Terminate and abend Terminates the program and forces an abend. the program and forces an abend. Debug Tool training sections Page 2 of 3 Using Debug Tool's graphical user interface (continued) Using the debugger Stepping through statements and running the program Program statement breakpoints Monitoring variables Making breakpoints conditional Watch breakpoints Program entry and exit breakpoints Ending the debugging session Loading program debug files Loading sysdebug. listings. dwarf. and source files Loading LANGX files Debugging CICS Applications Creating and editing a DTCN profile using the GUI plug-in 184 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Providing program information for the debugger Debug Tool reads a debug file for a program to display information about that program The type of file needed depends on the compiler A SYSDEBUG file Used with Enterprise COBOL and Enterprise PL/I The compiler creates it when a TEST(…,SEP) compiler option is specified A LANGX file Used with assembler, OS/VS COBOL, and COBOL II compiled with NOTEST It is produced by a utility program (EQALANGX) that runs after a compile or assembly A compiler listing Used with older PL/I compilers, and COBOL II compiled with TEST A dwarf or .mdbg file Used with XL C/C++ when certain compiler options are specified The program source file Used with XL C/C++, and older versions of Enterprise PL/I 185 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation The debugger can automatically locate the file for some compilers Enterprise COBOL and Enterprise PL/I compilers embed the name of the SYSDEBUG file in the load module The debugger can automatically load it if it exists Load Library SYSDEBUG Library Load Module SAM1 ‘library(SAM1)’ member SAM1 186 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation How the debugger locates debug files The debugger searches for debug files in this order: (For COBOL, PL/I, assembler, and C/C++ other than .mdbg files) For Enterprise COBOL and Enterprise PL/I programs, it will attempt to load the sysdebug file name that is embedded in the load module Then, if these commands were entered, the files and libraries that they specify are searched: SET SOURCE … SET DEFAULT LISTINGS … Then, if an EQADEBUG DD statement was coded in the JCL, the libraries in it's concatenation are searched Finally, using the “Debug Tool GUI Source Look Up Path” to indicate the location of debug files If a matching file is not found automatically, you can enter a command or click the “change text file” button to specify the correct file or library For LANGX files, also specify an LDD command to load the file 187 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation Debug Tool training sections Page 2 of 3 Using Debug Tool's graphical user interface (continued) Using the debugger Stepping through statements and running the program Program statement breakpoints Monitoring variables Making breakpoints conditional Watch breakpoints Program entry and exit breakpoints Ending the debugging session Loading program debug files Loading sysdebug, listings, dwarf, and source files Loading LANGX files Debugging CICS Applications Creating and editing a DTCN profile using the GUI plug-in 188 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation listings.mdbg file) 189 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .Example of loading sysdebug. and source files Use these examples for programs compiled with: Enterprise COBOL Enterprise PL/I COBOL II (compiled with a TEST compiler option) PL/I for MVS and VM OS PL/I XL C/C++ (when not using a . dwarf. A program was entered. but no debug file was found A message is A message is displayed displayed The source The source window is empty window is empty 190 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Enter the correct file. This mapping is not This mapping is not permanent permanent 1 1 click Click “Change Click “Change text file" text file" 2 2 click W02 © 2010 IBM Corporation 191 IBM Debug Tool for z/OS V10 Basic Mentor Workshop .Change Text File (Method 1) Enter the correct file. The debug file was loaded from the indicated location The source code is The source code is now available now available 192 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . SET DEFAULT LISTING (Method 2) Enter the “SET DEF LISTING” + Enter the “SET DEF LISTING” + location of the source information location of the source information Enter 193 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The debug file was loaded from the indicated location The source was loaded The source was loaded from the indicated location from the indicated location The source code is The source code is now available now available 194 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . and source files Loading LANGX files Debugging CICS Applications Creating and editing a DTCN profile using the GUI plug-in 195 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . dwarf. listings.Debug Tool training sections Page 2 of 3 Using Debug Tool's graphical user interface (continued) Using the debugger Stepping through statements and running the program Program statement breakpoints Monitoring variables Making breakpoints conditional Watch breakpoints Program entry and exit breakpoints Ending the debugging session Loading program debug files Loading sysdebug. Example of loading LANGX debug files Use this example to load LANGX debug files LANGX files are used for programs compiled with: Assembler VS COBOL II (compiled with the NOTEST compiler option) OS/VS COBOL 196 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . but no Langx file was found The source view shows The source view shows machine code machine code 197 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .A program was entered. Use a SET DEFAULT LISTINGS … command to specify LANGX file libraries Enter one library. or a list of Enter one library. or a list of libraries in parentheses libraries in parentheses When entering library names. do not specify member names do not specify member names or use quotation marks or use quotation marks Enter 198 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . When entering library names. Load the LANGX file with an LDD (load debug data) command It will search the SET DEFAULT It will search the SET DEFAULT LISTINGS library or libraries for the LISTINGS library or libraries for the specified member name specified member name The LDD command loads a The LDD command loads a LANGX file into the debugger LANGX file into the debugger Enter 199 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The Langx file was loaded from the library The source code is The source code is now available now available The SET DEFAULT LISTINGS The SET DEFAULT LISTINGS setting remains in effect for other setting remains in effect for other programs that are entered programs that are entered 200 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . compiler listings. library-2. or SET DEF LIST library-name . library-3. … ) Defines a library or libraries whose members are searched for program debug files You can concatenate sysdebug files.Loading program debug files SET DEFAULT LISTINGS library-name . and expanded source files all in the same list LDD member-name Loads the LANGX file in member-name from the library or libraries specified by the SET DEF LISTINGS … setting or an EQADEBUG DD 201 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . langx files. or SET DEF LIST ( library-1. listings. and source files Loading LANGX files Debugging CICS Applications Creating and editing a DTCN profile using the GUI plug-in 202 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . dwarf.Debug Tool training sections Page 2 of 3 Using Debug Tool's graphical user interface (continued) Using the debugger Stepping through statements and running the program Program statement breakpoints Monitoring variables Making breakpoints conditional Watch breakpoints Program entry and exit breakpoints Ending the debugging session Loading program debug files Loading sysdebug. the method used to start the debugger is unique in CICS 203 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .Starting Debug Tool with CICS applications The same interfaces to the debugger are available in both batch and CICS environments: Terminal full-screen interface Remote graphical user interface Using the debugger is the same in CICS and batch However. Starting debug Tool with CICS Programs The Debug Tool installer selects one of these methods to start the debugger in CICS The DTCN transaction Used to define a profile to start the debugger for one or more CICS programs There is an optional graphical user interface for DTCN DTCN profiles can be set from a workstation without using a terminal DTCN is a feature of IBM Debug Tool for z/OS The CADP transaction Used to define one or more profiles to start the debugger for CICS programs CADP is a feature of CICS 204 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Debug Tool training sections Page 2 of 3 Using Debug Tool's graphical user interface (continued) Using the debugger Stepping through statements and running the program Program statement breakpoints Monitoring variables Making breakpoints conditional Watch breakpoints Program entry and exit breakpoints Ending the debugging session Loading program debug files Loading sysdebug. dwarf. and source files Loading LANGX files Debugging CICS Applications Creating and editing a DTCN profile using the GUI plug-in 205 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . listings. show the DTCN Profiles View click Once the DTCN plug-in is installed. access the view by opening the “Other” access the view by opening the “Other” view menu view menu 206 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Once the DTCN plug-in is installed.In CICS Explorer. Select the DTCN profiles view dbl click Select the “DTCN Select the “DTCN Profiles” view Profiles” view 207 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The DTCN profiles view is displayed The “DTCN Profiles” view is The “DTCN Profiles” view is displayed near the “Debug displayed near the “Debug Console” view Console” view “Right click” actions: Activate – activate a profile Create – begin wizard driven profile creation Edit – wizard driven profile editing Delete – remove a profile Refresh – refresh view Preferences – edit the DTCN connection information defined at installation 208 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . right click and select “Create” right click and select “Create” 209 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .Create a new DTCN Profile RT click click 1 1 2 2 In the “DTCN Profiles” view. In the “DTCN Profiles” view. Specify your CICS user ID and "create" click 210 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Specify the settings for your DTCN profile Enter the transaction Enter the transaction or terminal ID or terminal ID “*” is a wild card “*” is a wild card click Optionally enter Load Optionally enter Load Module or Compile unit pairs Module or Compile unit pairs Select active or inactive Select active or inactive for profile status for profile status click Click next to continue Click next to continue IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation 211 . The type is set to TCP. MFI is available interface. The option for mainframe option for mainframe interface. MFI is available Selecting “TCP” updates Selecting “TCP” updates the TCPIP address the TCPIP address Ensure that port number Ensure that port number corresponds to the port corresponds to the port number RDz is listening to number RDz is listening to click 212 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .You can change the Test run-time options Ensure that the session Ensure that the session type is set to TCP. A new DTCN profile was created 213 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . In the “DTCN Profiles” view.Editing a DTCN profile RT click click 1 1 2 2 In the “DTCN Profiles” view. right click the profile and right click the profile and and select “Edit” and select “Edit” 214 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . DTCN profile editor Enter changes to the Enter changes to the DTCN Profile DTCN Profile 215 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The profile is added to the DTCN profiles list. and ready to trap the indicated transaction and ready to trap the indicated transaction 216 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .Starting the Debug Tool using a DTCN profile Open a CICS terminal Open a CICS terminal The profile is added to the DTCN profiles list. Run the transaction The The 217 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . The DTCN profile triggered the debugger when the application ran Open a CICS terminal Open a CICS terminal 218 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . Manage compiled language exception breakpoints 2 2 click 1 1 219 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation . ibm.Reference Visit the IBM Problem determination tools website at www. locate.ibm.com and search for “PD Tools” It describes the IBM Application Development Tools for z/OS and OS/390 and includes scenarios that show how to use the tools to recognize. and fix errors in application programs using: IBM Fault Analyzer IBM File Manager IBM Debug Tool IBM Application Performance Analyzer IBM Workload Simulator 220 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .com/software/awdtools/deployment/ Get the latest news about IBM problem determination tools products Download product manuals Recommended Redbook: "Introduction to the IBM Application Development Tools on z/OS and OS/390" Go to www.redbooks. ibm.Take the Debug Tool online tutorial Missed a class? Need a refresher course? Debug Tool training is available on the IBM website Go to: http://publib.boulder.jsp/ then click then click Debug Tool for z/OS (on the left side of the screen) web-based training (on the left side of the screen) 221 IBM Debug Tool for z/OS V10 Basic Mentor Workshop W02 © 2010 IBM Corporation .com/infocenter/ieduasst/stgv1r0/index.
Copyright © 2024 DOKUMEN.SITE Inc.