Presentation is loading. Please wait.

Presentation is loading. Please wait.

RDz Workbench – Debugging z/OS Assembler Applications

Similar presentations


Presentation on theme: "RDz Workbench – Debugging z/OS Assembler Applications"— Presentation transcript:

1 RDz Workbench – Debugging z/OS Assembler Applications
Jon Sayles, Rational System z Products -

2 IBM Trademarks and Copyrights
Developing COBOL with IBM WebSphere Developer for zSeries IBM Trademarks and Copyrights © Copyright IBM Corporation 2007,2008, 2009, 2010, 2011, All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. This information is based on current IBM product plans and strategy, which are subject to change by IBM without notice. Product release dates and/or capabilities referenced in these materials may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. IBM, the IBM logo, the on-demand business logo, Rational, the Rational logo, and other IBM Rational products and services are trademarks or registered trademarks of the International Business Machines Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others. Module 6 - Debugging COBOL programs

3 Course Contributing Authors
Developing COBOL with IBM WebSphere Developer for zSeries Course Contributing Authors Thanks to the following individuals, for assisting with this course: Larry England/IBM Russ Courtney/IBM Doug Stout/IBM Module 6 - Debugging COBOL programs

4 Developing COBOL with IBM WebSphere Developer for zSeries
Course Overview Audience This course is designed for application developers who have learned or programmed in Assembler, and who need to do z/OS Traditional Development and Maintenance as well as build leading-edge applications using Assembler and Rational Developer for System z. Prerequisites This course assumes that the student has a basic understanding and knowledge of software computing technologies, and general data processing terms, concepts and vocabulary, as well as a working knowledge of Assembler and z/OS. Knowledge of SQL (Structured Query Language) is assumed for database access is assumed as well. Basic PC and mouse-driven development skills, terms and concepts are also assumed. Module 6 - Debugging COBOL programs

5 Developing COBOL with IBM WebSphere Developer for zSeries
Course Topics Course Name: Rational Developer for System z Foundation Training Course Description: Learn how to use Rational Developer for System z to do z/OS traditional development, maintenance, support and for Enterprise Modernization of z/OS applications Pre-requisites: Some experience developing Assembler applications using z/OS is expected. A working knowledge of SQL is also recommended. Course Length: ~5days – or if done in self-paced mode, at your own pace Topics (Agenda) Getting Started - installing and configuring RDz - and the course materials, and using Eclipse The RDz Workbench Code analysis tools Editing Compiling programs Debugging local Assembler programs The Data Perspective: Working with relational data sources Modifying test data Editing and testing SQL statements Working with remote system resources: Connecting to a mainframe Data management Accessing and editing files z/OS Application Development Creating MVS Subprojects Creating and customizing project properties Debugging z/OS Applications Debugging Batch Applications Setting Debug Tool for Online Applications Working with File Manager Creating test data Editing complex file-types Working with mainframe ABENDs using Fault Analyzer Creating Fault History views Analyzing and solving mainframe ABENDs Creating and modifying BMS Maps using the BMS Map Editor Module 6 - Debugging COBOL programs

6 The RDz Workbench UNIT Topics:
Debugging z/OS Assembler Batch Applications Debugging z/OS Assembler Online Applications Appendix

7 Developing COBOL with IBM WebSphere Developer for zSeries
Topic Considerations  Note: In this topic you will learn how to debug a Assembler program running on a z/OS mainframe. The screen captures all describe connecting to a public z/OS machine that IBM makes available – during classes. If you are taking this course through standard IBM services delivery you should be able to use the properties (I/P address, port#s, etc.), logon IDs and passwords that your instructor provides you with. But you may also be taking this course standalone – and in that case, you will need to speak to your company's Systems Programming staff to learn how to connect and logon. It goes without saying that the actual file names in the screen captures of mainframe libraries and datasets will vary. So you should focus on the process and steps and "how to" – and don't be perplexed at differences in screen captures. You also may be using your company's own Source Control Management system – to do things like builds, compiles, etc. In that case much of the remote functionality in RDz will be customized and tailored to your company's unique and idiosyncratic procedures and protocols. Module 6 - Debugging COBOL programs

8 Workshop Considerations
Developing COBOL with IBM WebSphere Developer for zSeries Workshop Considerations  Note: Unfortunately, due to the fact that you will need an I/P address that resolves to your workstation in order to use IBM Debug Tool, there is no way that you can use the Sandbox or zServerOS for workshops that reflect the content in this unit. Your options for additional learning include: Return to the RDz Workbench Introduction unit – and carefully go over all the Debug option materials in the slides. Note that the workbench interface/perspective and > 95% of the functionality of Remote Debug is also contained in Local Debug. Along with this course you can watch the following Camtasias on RDz Debugging: 1. 2. RDz and Debugging  RDz and Remote Development (including Debugging)  Module 6 - Debugging COBOL programs

9 Developing COBOL with IBM WebSphere Developer for zSeries
Topic Objectives After completing this unit, you should be able to: Describe the concept of source code debugging List the run-times that Debug Tool supports List the steps in preparing a program for debugging Debug a mainframe batch job Describe the run/step/animate options List PF-Keys associated with them Set/unset/inspect conditional and unconditional break-points Set "watch" break-points that halt execution when a value in a variable changes Show how to access the LPEX editor functionality during debugging (such as Perform Hierarchy) Be able to Jump to any given line, and run to a line Show how to change variable values dynamically during debug Show how to set different levels of variable display Monitor specific variables you are interested in Debug a CICS online transaction Discuss the Debug Option setup and configuration requirements for Online Debugging DTCN Profile/View DTCN Transaction Launch a CICS transaction that invokes Debug Tool Module 6 - Debugging COBOL programs

10 Developing COBOL with IBM WebSphere Developer for zSeries
Debugging Overview Face facts: No one gets it right the first time. Not at the level of production business logic That's why IBM invented source-level application debuggers, so that you can: View program execution, line-by-line Verify the value of a variable – during program execution Stop and start program execution, and analyze results at the speed that our procedural understanding of the application's execution flow can handle The z/OS-based debugging engine is provided by the IBM Debug Tool for z/OS product. It runs on the z/OS.  "Perspectives" - Recall that a "Perspective" is a convenient grouping for a collection of views organized around a given role or task So far in this class, you've used the: z/OS Projects Perspective – to develop local Assembler applications Data Perspective – to develop local Assembler applications Debug Perspective – to do source-code (line-by-line) testing of your Assembler logic Module 6 - Debugging COBOL programs

11 Enter Source-Level Debuggers
Developing COBOL with IBM WebSphere Developer for zSeries Enter Source-Level Debuggers Specifically: IBM Debug Tool/PD Tools Family Green-screen (TSO-based) or RDz/Workstation-based interface to z/OS-based debugging engines Debug: Online (CICS, or IMS TM) Batch Multiple languages (Assembler, PL/I, COBOL, Java, etc.) Seamless debugging of mixed-language/cross-platform applications Interactive, source-level debugging in RDz with program running on z/OS Display, monitor and alter program variables Set standard types of breakpoints View data in Hex (EBCDIC) or string values Multiple configurable views Ability to make adjustments to the program while debugging Debug Tool product web-site: There is also IBM Rational Developer Debugger for System z Version 7.0 which is an affordably priced subset of IBM Rational Developer for System z functions that is designed to provide a workstation-based graphical interface to IBM Debug Tool and IBM Debug Tool Utilities and Advanced Functions. This product is specifically designed for developers who do not require the full-function Rational Developer for System z product. The functions listed on this page are available in both the Rational Developer for System z and Rational Developer Debugger for System z products. Module 6 - Debugging COBOL programs

12 Debug Tool - Application Environments
Developing COBOL with IBM WebSphere Developer for zSeries Debug Tool - Application Environments One debugging engine, with support for many environments: DB2 stored procedure UNIX systems services Batch CICS IMS/TM 3270 or GUI 3270 or GUI 3270 or GUI 3270 or GUI 3270 or GUI Debug Tool Debug Tool Debug Tool Debug Tool Debug Tool Debug tool provides a single debugging engine that supports many different environments. You can use the same debugger for your batch, CICS, and online IMS applications. It is the same debugging engine when you work with DB2 stored procedures and programs running with UNIX systems services on z/OS. As a result, you only have to learn to use a single debugger. You do not need a different debugger in each of your application environments. Batch Application CICS Application IMS Application DB2 Stored Procedure Posix Application Transaction Transaction Batch region CICS region IMS/TM region WLM region z/OS Module 6 - Debugging COBOL programs

13 RDz Interfacing with Debug Tool
Developing COBOL with IBM WebSphere Developer for zSeries RDz Interfacing with Debug Tool Debug Tool Engine Debug Tool Your Application Load Module TCP/IP z/OS Data Source There are also remote GUI interfaces to debug tool. The same debugging engine is used to control the application running on the mainframe, and it communicates with special software that is installed on your workstation. You can install RDz (Rational Developer for system Z) or RDDz (Rational Developer Debugger for system Z) to provide a GUI front end to debug tool. You may prefer to use one of these GUI debugging interfaces, since they are intuitive and easy to use. Debug tool can also interface with the GUI debugging front-ends available in a few other workstation software products including WDDz and WSED. The RDz remote debugger Client software that is installed with RDz on your workstation Communicates with the Debug Tool engine on the mainframe Note that Debug Tool must be installed on z/OS in order for you to do the labs in this unit Module 6 - Debugging COBOL programs

14 Steps for Batch Application Debug Session
Developing COBOL with IBM WebSphere Developer for zSeries Steps for Batch Application Debug Session Ensure that your compile proc has the necessary TEST parameter, and Compile/Link options and DD cards to create a debug-ready load module Discover workstation TCP/IP parameters: IP Address Listener port# Enter TCP/IP address of workstation in run JCL for Debug Tool DD statement, and Submit the JCL Load the Assembler source code Debug the application There is also IBM Rational Developer Debugger for System z Version 7.0 which is an affordably priced subset of IBM Rational Developer for System z functions that is designed to provide a workstation-based graphical interface to IBM Debug Tool and IBM Debug Tool Utilities and Advanced Functions. This product is specifically designed for developers who do not require the full-function Rational Developer for System z product. The functions listed on this page are available in both the Rational Developer for System z and Rational Developer Debugger for System z products. Module 6 - Debugging COBOL programs

15 Compile JCL Requirements for Using Debug Tool for Assembler
Developing COBOL with IBM WebSphere Developer for zSeries Compile JCL Requirements for Using Debug Tool for Assembler To debug Assembler programs, you will need additional datasets and steps: SYSADATA EQALANGX Step creates Debug symbolics See the Debug Tool v11 Users Guide – Chapter 6 Preparing an Assembler program – for more information on these datasets. Sample Assembler JCL is in the slide notes Transition statement: The following slide shows how to set the compiler options in the workbench. //JOBNAME JOB , // MSGCLASS=H,MSGLEVEL=(1,1),TIME=(1,5),REGION=70M,COND=(16,LT), // NOTIFY=DDS0001 //* //* SAMPLE JCL TO PREPARE AN ASSEMBLER PROGRAM //* FOR THE IBM ZSERIES PD TOOLS PRODUCTS: //* FAULT ANALYZER, DEBUG TOOL, AND APPLICATION PERF. ANALYZER //* NOTES: //* THE ADATA PARM WILL PRODUCE A SYSADATA FILE //* SET PARMS FOR THIS COMPILE: //* // SET MEM=ORDUPD PROGRAM NAME // SET LEHLQ='CEE' LE HIGH LVL QUALIFIER // SET UNITDEV=SYSALLDA UNIT FOR TEMP FILES // SET LANGX='EQALANGX' XXXLANGX UTILITY PROGRAM // SET LANGXLIB='LNKLST.DEBUG.V12R1.SEQAMOD' //* NOTE: YOU CAN USE THE XXXLANGX UTILITY SHIPPED WITH DT, FA, //* OR APA. THE NAMES ARE DIFFERENT, BUT RESULTS ARE THE SAME //* USE ANY OF THEM... THEY ALL PRODUCE THE SAME RESULTS. //* IF YOU HAVE: SET LANGX TO: SET LANGXLIB TO: //* DEBUG TOOL EQALANGX THE DT SEQAMOD LIBRARY //* FAULT ANALYZER IDILANGX THE FA SIDIMOD1 LIBRARY //* APA CAZLANGX THE APA SCAZAUTH LIBRARY //* ********************************* //* ASSEMBLER STEP //ASM1 EXEC PGM=ASMA90,COND=(4,LT),REGION=32M, // PARM='ADATA,OBJECT' //SYSIN DD DISP=SHR,DSN=&SYSUID..TEST.ASM(&MEM) //SYSPRINT DD SYSOUT=* //SYSLIN DD DISP=SHR,DSN=&SYSUID..TEST.OBJ(&MEM) //SYSADATA DD DISP=SHR,DSN=&SYSUID..SYSADATA(&MEM) //SYSLIB DD DSN=SYS1.MODGEN,DISP=SHR // DD DSN=SYS1.MACLIB,DISP=SHR // DD DSN=DDS0001.TEST.MACLIB,DISP=SHR // DD DSN=&LEHLQ..SCEEMAC,DISP=SHR //SYSUT1 DD DISP=(NEW,DELETE),DSN=&&SYSUT1,SPACE=(1700,(900,450)), // UNIT=&UNITDEV //SYSUT2 DD DISP=(NEW,DELETE),DSN=&&SYSUT2,SPACE=(1700,(600,300)), //SYSUT3 DD DISP=(NEW,DELETE),DSN=&&SYSUT3,SPACE=(1700,(600,300)), //* STEP TO GENERATE LANGX FILE //LANGX EXEC PGM=&LANGX,REGION=32M, // PARM='(ASM ERROR' //STEPLIB DD DISP=SHR,DSN=&LANGXLIB // DD DISP=SHR,DSN=&LEHLQ..SCEERUN //SYSADATA DD DSN=&SYSUID..SYSADATA(&MEM),DISP=SHR //IDILANGX DD DSN=&SYSUID..EQALANGX(&MEM),DISP=SHR //* LINK-EDIT (BINDER) STEP //LINK EXEC PGM=IEWL,PARM='MAP',REGION=0M //SYSLIB DD DSN=&LEHLQ..SCEELKED,DISP=SHR // DD DSN=DDS0001.TEST.LOAD,DISP=SHR //SYSLMOD DD DISP=SHR,DSN=&SYSUID..TEST.LOAD(&MEM) //SYSUT1 DD UNIT=SYSDA,SPACE=(TRK,(10,10)) //SYSLIN DD DSN=&SYSUID..TEST.OBJ(&MEM),DISP=SHR // DD * MODE AMODE(31),RMODE(24) ENTRY ORDUPD Module 6 - Debugging COBOL programs

16 2. Discover TCP/IP address and RDz Port
Developing COBOL with IBM WebSphere Developer for zSeries 2. Discover TCP/IP address and RDz Port Open the Debug Perspective Click the small downward pointing triangle next to the debug-daemon icon Note the Port# Select: Get Workstation IP… Copy the IP address That shows this pull-down menu that displays the listening port. In this example it is port number 8001, but yours may be different. Just so you know, you can configure RDz so that it uses a different port if you prefer. Also due to security reasons, Port# 8003 is used frequently Note: Your RDz Port# will most likely be set once, and will change infrequently. However, depending on your installation's setup, your workstation's TCP/IP address could change - often See Notes Module 6 - Debugging COBOL programs

17 3. Submit the JCL for Assembler Debugging
Developing COBOL with IBM WebSphere Developer for zSeries 3. Submit the JCL for Assembler Debugging Configure your application to start Debug Tool by including a specific DD card in the run JCL – that includes your workstation's current Port# and TCP/IP address This is an example of JCL to run a batch job The EQANMDBG DD statement is the easiest way to start the Debug Tool for batch applications //EQANMDBG DD * PGM TEST(,,,TCPIP& %8003:) //JOBNAMEJ JOB , // MSGCLASS=H,MSGLEVEL=(1,1),TIME=(,4),REGION=144M,COND=(16,LT) //* ADD A JOB CARD ABOVE THIS LINE //******************************************************************** //* RUN SAMPLE NON-LE ASSEMBLER PROGRAM ASAM //* CALLS ASSEMBLER SUBPROGRAM ASAM //* //******************************************************************** //* //* THE ORIGINAL EXEC STATEMENT IS COMMENTED: //*** ASAM1 EXEC PGM=ASAM1,PARM='123,ABC' //* THIS EXEC STATEMENT WITH AN EQANMDBG DD WILL START DEBUG TOOL //* FOR A NON-LE PROGRAM //ASAM1 EXEC PGM=EQANMDBG,PARM='123,ABC' //EQANMDBG DD * ASAM1,TEST(,,,TCPIP& %8003:) //* ASAM1,TEST(,,,MFI%TRMDT004:) //* ASAM1,TEST(,,,TCPIP& %8001:) //************** OTHER OPTIONAL DD'S FOR DEBUG TOOL ********* //** //INSPLOG DD SYSOUT=* //** //EQADEBUG DD DSN=&SYSUID..ADLAB.SYSDEBUG,DISP=SHR //** // DD DSN=&SYSUID..ADLAB.EQALANGX,DISP=SHR //** //INSPPREF DD DSN=&SYSUID..ADLAB.DTPREF,DISP=SHR //*********************************************************** //IDILANGX DD DSN=DDS0001.EQALANGX,DISP=SHR //STEPLIB DD DSN=DDS0001.TEST.LOAD,DISP=SHR //*** DD DISP=SHR,DSN=DEBUG.V9R1.SEQAMOD (UNCOMMENT IF NEEDED) //*** DD DISP=SHR,DSN=CEE.SCEERUN (UNCOMMENT IF NEEDED) //FILEIN DD *,DCB=(LRECL=80) INPUT RECORD ONE INPUT RECORD TWO INPUT RECORD THREE INPUT RECORD FOUR INPUT RECORD FIVE INPUT RECORD SIX INPUT RECORD SEVEN INPUT RECORD EIGHT XBEND <=== "ABEND" WILL CAUSE THE SAMPLE PROGRAM TO ABEND //FILEOUT DD SYSOUT=* //******************************************************************* //* SAMPLE FILES AND PARAMETERS FOR DEBUG TOOL AND FAULT ANALYZER: //* SAMPLE OPTIONAL FILES FOR FAULT ANALYZER: //* //* IDIOPTS CAN BE USED TO SPECIFY FAULT ANALYZER PARAMETERS //IDIOPTS DD * INCLUDE,MAXMINIDUMPPAGES(1000) NODUP(NORMAL(0)) /* //* IDIOFF, IF PRESENT, WILL TURN OFF FAULT ANALYSIS FOR THE STEP //* //IDIOFF DD DUMMY //* IDILCOB IS A PDS CONCATENATION FOR Assembler COMPILER LISTINGS: //* //IDILCOB DD DSN=&SYSUID..ADLAB.LISTING,DISP=OLD //* IDILANGX IS A PDS CONCATENATION FOR LANGX FILES: //* //IDILANGX DD DSN=&SYSUID..ADLAB.EQALANGX,DISP=OLD //* IDISYSDB IS A PDS CONCATENATION FOR SYSDEBUG FILES: //* //IDISYSDB DD DSN=&SYSUID..ADLAB.SYSDEBUG,DISP=OLD //* IDITRACE CAN BE USED TO PRINT A TRACE OF THE LISTINGS SEARCH //IDITRACE DD SYSOUT=* Sample JCL In Slide Notes Module 6 - Debugging COBOL programs

18 Developing COBOL with IBM WebSphere Developer for zSeries
3a. Debug Tool - Prompts Debug Tool will interface with RDz and throw the Confirm Perspective Switch prompt Click Yes Additionally, if your mainframe source code is out sync with the Load Module you'll get an informational prompt. This typically means you need to check your compile listings for syntax errors that caused the link edit step not to execute because of condition codes Next, go to your z/OS system. The next step is to configure your host application so that it triggers Debug Tool when it runs. This is an example of batch JCL that has been modified to start Debug Tool. Some people choose to start Debug Tool for certain batch applications by coding a CEEOPTS DD statement and specifying a TEST parameter. Notice that the workstation IP address and port number have been coded in the TEST parm. When this job is submitted and runs, Debug Tool will start and will connect to RDDz. There are a lot of different ways to start Debug Tool. This example shows only one method. If you would like to see other ways to start the debugger, review the tutorial sections that describe starting the debugger. Module 6 - Debugging COBOL programs

19 3b. Debug Tool Connects to RDz
Developing COBOL with IBM WebSphere Developer for zSeries 3b. Debug Tool Connects to RDz Debug Perspective is launched in RDz Program source is copied down from z/OS to your RDz workstation Execution is on z/OS Assembler Note: You will need to use the Debug Console – and issue the command: LDD Programname Where: LDD is Load Debug file, and Programname is the name of your main module Regardless of the method you use to trigger Debug Tool on the host, when the application runs, Debug Tool starts and connects to RDz. When that happens, you will see information about the application displayed in the “Debug” window, and if available, you may see program source code displayed. You can get help at any time by clicking “Help” on the menu. Note: Initially the Assembled instruction set is loaded into Debug Tool. You will want to load and utilize "debug data" source – the LANGX file output from Assemble in your testing. This is achieved via the LDD XXXX command (next slide) Module 6 - Debugging COBOL programs

20 4. Load Debug Data (LDD Command)
Developing COBOL with IBM WebSphere Developer for zSeries 4. Load Debug Data (LDD Command) Before you can debug an assembler program, you must: Define the compilation unit (CU) as an assembler CU Load the debug data for the compilation unit. This can only be done for a compilation unit that is currently known to Debug Tool as a "disassembly CU". Use the LOADDEBUGDATA command abbreviated as LDD … to define a disassembly CU as an assembler CU and to cause the debug data for this CU to be loaded. See the Debug Tool Users Guide for additional details on this command Steps: From the Debug Console view Enter the Debug Command: LDD <modulename> Note: Debug Commands are not case-sensitive Assembler Note: You will need to use the Debug Console – and issue the command: LDD Programname Where: LDD is Load Debug file, and Programname is the name of your main module Regardless of the method you use to trigger Debug Tool on the host, when the application runs, Debug Tool starts and connects to RDz. When that happens, you will see information about the application displayed in the “Debug” window, and if available, you may see program source code displayed. You can get help at any time by clicking “Help” on the menu. Module 6 - Debugging COBOL programs

21 Developing COBOL with IBM WebSphere Developer for zSeries
5. The Debug Perspective and Views Breakpoints Monitors and Registers views The Debug Icons Assembler Macro Expansions Your code That reset all of the views to their original, default positions. Take a look at the Debug view. It is in the upper left pane. It displays information about the current debugging session. Notice that it shows you the current program call chain, so you know where you are in the application. If you left-click a program name in the Debug window, you can see it’s source, and a right-click will display the program’s properties. Current Instruction Pointer Hovering over a variable returns the variable value Load Module Disassembled Offset Object Code Module 6 - Debugging COBOL programs

22 Developing COBOL with IBM WebSphere Developer for zSeries
Debug and RDz's LPEX Editor Functionality Prefix Area That reset all of the views to their original, default positions. Take a look at the Debug view. It is in the upper left pane. It displays information about the current debugging session. Notice that it shows you the current program call chain, so you know where you are in the application. If you left-click a program name in the Debug window, you can see it’s source, and a right-click will display the program’s properties. Command Line  All of the LPEX editing features work under Debug Tool Module 6 - Debugging COBOL programs

23 Developing COBOL with IBM WebSphere Developer for zSeries
Action Icons – Review Debug Listener (Should be green) Resume: Run the program to the next breakpoint or to the end Step Return: run until return from subprogram Terminate: End the program Step Over: run one statement, but step over a CALL Notice the icons in the action bar. You can click on these icons to make the program take certain actions such as run to the next breakpoint or run a single statement. The green triangle is resume. If you click on it, the program will run until it hits a breakpoint. If you do not have any breakpoints, or if the program does not reach any of your breakpoints as it runs, it will run all the way to the termination of the application. The red box is terminate. It forces the immediate termination of the application with a zero return code. If you terminate the application this way, no more statements run. The disconnect icon lets you disconnect Debug Tool from the application, but allow the application to continue normally. You might use this if you have seen what you needed to see in the debug session, and the program is running as expected, and you want to let it complete normally but do not need to watch it. The yellow down arrow is “step”, or “step into”. Step runs a single program statement. You can watch a program run statement by statement by clicking on the step icon several times in row. In many cases, if the current statement calls a sub-program, the step button will step directly into the subroutine or procedure. The step over icon allows you to step over a CALL statement or procedure call. Use this if you want to run a subroutine or procedure, but do not need to see the sub-program in the debugger. The step return icon can be used when you are already in a sub-program. Click on this, and the application will run until the next program return. Use it to quickly run to the end of a program or sub-program. Step: run one statement Disconnect: from the debug engine Animated Step Continuous source-level debugging without user interaction Module 6 - Debugging COBOL programs

24 Developing COBOL with IBM WebSphere Developer for zSeries
Run Menu Shows same + additional debugging functionality as icons on toolbar However, not all Run menu functionality enabled for Assembler/PL1 Also shows hot-keys Your PC's function keys Context-sensitive: Options are grayed in current debug session if not applicable You can also select an action by selecting “run” from the menu. And remember that there are keyboard combinations that you can use to perform the same actions. Module 6 - Debugging COBOL programs

25 Developing COBOL with IBM WebSphere Developer for zSeries
Displaying/Manipulating the Registers Enable from: Window > Show View > Registers Opens the Registers view to a scrollable, editable register list with access to the following: That reset all of the views to their original, default positions. Take a look at the Debug view. It is in the upper left pane. It displays information about the current debugging session. Notice that it shows you the current program call chain, so you know where you are in the application. If you left-click a program name in the Debug window, you can see it’s source, and a right-click will display the program’s properties. Module 6 - Debugging COBOL programs

26 Statement Breakpoints – Review
Developing COBOL with IBM WebSphere Developer for zSeries Statement Breakpoints – Review A statement breakpoint will stop the program when it reaches a statement: It stops before the statement runs A breakpoint can optionally be made conditional A simple condition may be specified such as: VAR1 > 999 …or… VAR2 = 'ABC' A breakpoint can be based on a frequency: Stop the Nth time a statement runs You can set breakpoints that will trigger when the program gets to a specific statement. Statement breakpoints trigger before the statement runs, and the debugger pauses, showing the statement as the active statement. Optionally, you can make a statement breakpoint conditional, so that it only triggers at that statement if the condition is true. For example, a variable must have a certain value. Also, you can trigger a breakpoint based on frequency. That is an easy way to pause the program when a certain statement has run, say, 1000 times. Module 6 - Debugging COBOL programs

27 Set a Statement Breakpoint – Review
Developing COBOL with IBM WebSphere Developer for zSeries Set a Statement Breakpoint – Review One way to set a statement breakpoint is to double-click in the gray area to the left of the statement. dbl click Set a statement breakpoint by double-clicking in the gray area next to a statement Module 6 - Debugging COBOL programs

28 Set/Edit Conditional Statement Breakpoints
Developing COBOL with IBM WebSphere Developer for zSeries Set/Edit Conditional Statement Breakpoints Select the Breakpoint. Right-click and select: Edit Breakpoint… A breakpoint can trigger the Nth time the statement runs… You can specify optional breakpoint options. If you enter a number in the “from” field, that specifies how many times the statement has to run before the breakpoint triggers. For example, say that you want to read an input file until you get to record number Set a statement breakpoint on the READ statement in the program, with a “from” value of When you resume the program, it will be paused at the read statement just before it is ready to read the 500th record. You can also enter an expression in the “expression” field. You will see more about that in a minute. Click on the “finish” button. RECORDS = 9 … and breakpoints can be conditional. Can set to different statement/line Or click Next > to specify conditional breakpoint logic Module 6 - Debugging COBOL programs

29 Watch Monitor Breakpoints
Developing COBOL with IBM WebSphere Developer for zSeries Can have breakpoints occur conditionally, when: The value in a field changes Some portion (# of bytes) of a field changes A simple condition tests true for the value in the field Steps: Select a variable Right-click, and select: Add Watch Breakpoint… Select Number of bytes to watch – or add a simple condition Specify Auto to test for all bytes You can specify optional breakpoint options. If you enter a number in the “from” field, that specifies how many times the statement has to run before the breakpoint triggers. For example, say that you want to read an input file until you get to record number Set a statement breakpoint on the READ statement in the program, with a “from” value of When you resume the program, it will be paused at the read statement just before it is ready to read the 500th record. You can also enter an expression in the “expression” field. You will see more about that in a minute. Click on the “finish” button. Module 6 - Debugging COBOL programs

30 Run (F8) to a Statement Breakpoint
Developing COBOL with IBM WebSphere Developer for zSeries Run (F8) to a Statement Breakpoint Resume click Notice that your breakpoints are shown in the breakpoints view. In this example, the program is about to run statement You know that because it is the highlighted statement. The “resume” button is clicked. If you are on a call statement and issue the STEP command, it will STEP INTO (default of the STEP command) the called routine and bring up the source for the called program. If you want to bypass the CALL statement all together you can reposition the execution pointer past the CALL statement by using the JUMPTO line-nnn command. If you just want the called program to execute w/o having the source for the called routine comes up, you can issue the STEP OVER command which will execute the called routine and just move you to the next statement in the current program. Or…to Run (Resume) without stopping try using the STEP RETURN command A breakpoint icon is shown… and the breakpoint is also shown in the Breakpoints view. See Slide Notes Module 6 - Debugging COBOL programs

31 Breakpoint Options – 1 of 2
Developing COBOL with IBM WebSphere Developer for zSeries Breakpoint Options – 1 of 2 Disable (but do not Remove) Breakpoints by un-checking a box  The program ran to the breakpoint … or by deleting it from the Breakpoints view from the Context Menu And the program ran until it reached the next breakpoint. If you want to remove the breakpoint, you could double-click on the breakpoint icon in the gray area to the left of the statement. Or you could also delete it from the breakpoints view. You can remove the breakpoint by double clicking again here… Module 6 - Debugging COBOL programs

32 Breakpoint Options – 2 of 2
Developing COBOL with IBM WebSphere Developer for zSeries Breakpoint Options – 2 of 2 Disable (but do not Remove) Breakpoints by un-checking a box  By Editing a Breakpoint… you can make the Breakpoint conditional (prior topic) And the program ran until it reached the next breakpoint. If you want to remove the breakpoint, you could double-click on the breakpoint icon in the gray area to the left of the statement. Or you could also delete it from the breakpoints view. Module 6 - Debugging COBOL programs

33 Entry Breakpoint Options
Developing COBOL with IBM WebSphere Developer for zSeries Entry Breakpoint Options You can set an “Entry Breakpoint” – which would allow you to Resume (run) your module until the Called program is launched by z/OS Resume to the Called module From Modules  Right-click the module and Set an Entry breakpoint And the program ran until it reached the next breakpoint. If you want to remove the breakpoint, you could double-click on the breakpoint icon in the gray area to the left of the statement. Or you could also delete it from the breakpoints view. Note that you will need to load the Debug Descriptor (LDD) for the subroutine(s) Module 6 - Debugging COBOL programs

34 Monitoring Variable Values
Developing COBOL with IBM WebSphere Developer for zSeries Monitoring Variable Values Besides hovering over a variable, you can: 1. Double-click and select any variable 2. Right-click and monitor the variable value throughout your debug session The Monitors view shows the variable's value Module 6 - Debugging COBOL programs

35 Monitors View – Options
Developing COBOL with IBM WebSphere Developer for zSeries Monitors View – Options Monitored variable value – in EBCDIC internal display  very useful for debugging data exceptions Change Value… allows you to modify the variable's value on the fly – during debug Module 6 - Debugging COBOL programs

36 Detach the Monitors View
Developing COBOL with IBM WebSphere Developer for zSeries Detach the Monitors View A useful Best Practice… Can view any # of variable values during debug, animated debug or Resume to breakpoints Module 6 - Debugging COBOL programs

37 Making Optimal use of Screen Real Estate
Developing COBOL with IBM WebSphere Developer for zSeries Making Optimal use of Screen Real Estate Some of the Debug Perspective views are not enabled for Assembler programs: Variables, Outline, etc. Along with detaching views, consider moving the useful Assembler views "front-and-center" to maximize your screen real estate – adding to your ability to see as much useful information at a glance Registers view Breakpoints view Monitors view Module 6 - Debugging COBOL programs

38 Developing COBOL with IBM WebSphere Developer for zSeries
Monitor Memory Monitor Memory The memory content can be shown (or “rendered”) in several different formats: Raw HEX, EDBCDIC or ASCII Tree structure using customized XML mappings. 1) The Memory view shows the contents of storage at a particular address. This memory content can be shown (or “rendered”) in several different formats, such as raw HEX, EDBCDIC or ASCII, or even as a tree structure using customized XML mappings. 2) The separate Memory and Memory Rendering views in RDz V6 have been consolidated into a single Memory view in V7. Rendering tabs can be stacked, or placed side-by-side in a split-pane mode. If placed side-by-side, cursor movements in one rendering can be mirrored in the other rendering. Module 6 - Debugging COBOL programs

39 Developing COBOL with IBM WebSphere Developer for zSeries
The Debug Console View Debug Tool messages You can enter a subset of commands from the Debug Tool 3270 interface, a list of Debug Tool commands that are valid for use in RDz can be found in the Appendix of the Debug Tool Reference and Messages Guide. The Debug Console view shows RDz messages and lets you enter some Debug Tool commands The debug console view shows messages that are produced by RDDz, and lets you enter certain Debug Tool commands. You can enter a subset of commands that are used in the 3270 Debug Tool interface. For example, if you enter “set automonitor on”, or it’s abbreviation, that will turn on the automonitor. In most cases, the debug console view is used infrequently to turn on certain settings or load source information. That is the end of part one of using the RDDz remote debugging interface. Place your cursor in the Command area and press Ctrl+Spacebar – to see a list of available commands Module 6 - Debugging COBOL programs

40 Debug Console Commands – Tracing Through Statement Execution
Developing COBOL with IBM WebSphere Developer for zSeries Debug Console Commands – Tracing Through Statement Execution This is another very popular command: SET AUTOMONITOR ON LOG It forces Debug Tool to track each statement as it's executed and write it to the Debug Console Using this technique you can copy and paste your program's dynamic execution and trace forward and backward through any portion of your code You can also copy all of the statements to hard-copy : Right-click Select Export History Specify a file – preferably an RTF or MS-Word doc, as formatting will be retained And the program ran until it reached the next breakpoint. If you want to remove the breakpoint, you could double-click on the breakpoint icon in the gray area to the left of the statement. Or you could also delete it from the breakpoints view. Module 6 - Debugging COBOL programs

41 Developing COBOL with IBM WebSphere Developer for zSeries
Debug Option – Jump to / Run To Jump to Location - skip over sections of code to avoid executing certain statements or move to a position where certain statements can be executed again. Useful: To avoid called programs or I/OS to a not available dataset Or to iteratively execute some statements of interest Run to Location - executes all statements between the current location and the run-to location. Context Menu Module 6 - Debugging COBOL programs

42 How to return from anywhere in your program to the Current Instruction
To get back to the Current Instruction Pointer (the "next sequential instruction") – if you've navigated away within the source: Click the small blue rectangle in the right-hand margin of your source code

43 Obtaining the Outline View
To enable the Outline View during your Debugging session: From Remote Systems – open the program Manipulate the View size/window proportion, and ensure that the Outline view synchronizes with the source file editor Note that the Outline view will not synchronize with the Debugger's code view

44 Handling program abends
Developing COBOL with IBM WebSphere Developer for zSeries Handling program abends Debug Tool can receive control back from the system after an abend occurs The program will be stopped at the abending statement You can: Allow the application to abend and terminate Capture abend info with a product such as Fault Analyzer Terminate the application and prevent further processing Or continue running the program Usage note: The LE TRAP(ON) option must be active Module 6 - Debugging COBOL programs

45 Terminating the application
Developing COBOL with IBM WebSphere Developer for zSeries Terminating the application There are several options for terminating your application: Remain in the debugger, and RESUME until the program runs to completion The program will terminate normally or with an abend The return code is controlled by the program Disconnect the debugger, and allow the program to run to completion Module 6 - Debugging COBOL programs

46 Termination action buttons
Developing COBOL with IBM WebSphere Developer for zSeries Termination action buttons You can immediately terminate the application using action buttons Disconnect: Disconnect Debug Tool from the application. The program continues to run from the current location without the debugger. And subsequent batch job steps can finish as well. Terminate: Immediate termination of the application. No more program statements run. RC=0 is returned to the environment. Module 6 - Debugging COBOL programs

47 Force an immediate termination with abend
Developing COBOL with IBM WebSphere Developer for zSeries Force an immediate termination with abend 1 Right click in the Debug view rightclick 2 Options Terminate and abend 3 Module 6 - Debugging COBOL programs

48 Restart Your Debugging Session
Developing COBOL with IBM WebSphere Developer for zSeries Restart Your Debugging Session For batch debugging If your submitted JCL is still in the code (Content) area No need to return to the z/OS Projects perspective Right-click Select: Submit Note that F11 (or Debug from the Run menu) does NOT work – as it did with Local Assembler debugging Module 6 - Debugging COBOL programs

49 Developing COBOL with IBM WebSphere Developer for zSeries
Summary Having completed this unit, you should now be able to: Describe where the debug engines are located Show how to set the workbench preferences for running and debugging Show how to invoke the debugger for local programs Describe the views of the Debug perspective Demonstrate how to set breakpoints in Assembler code Explain how to set up the Assembler compile options for remote debugging Show how to debug a remote batch Assembler program Module 6 - Debugging COBOL programs

50 Batch Assembler Debugging Workshop

51 Pre-Workshop Overview
You will use Debug Tool to test the ASAM1 and ASAM2 batch Assembler programs Steps: Allocate data sets Modify the JCL for the compile and run stream JCL Find your workstations: I/P Address Port# Substitute those variables into the run steam JCL Debug Test out various Debug Tool options At any point, you can terminate your debug session by clicking the Red icon or pressing Ctrl+2 You can submit the JCL again – Debug (again)

52  Workshop – Preparing for the Workshop
Developing COBOL with IBM WebSphere Developer for zSeries  Workshop – Preparing for the Workshop Prerequisites: Ensure the IBM Debug Tool is installed and configured on your z/OS You may need to speak to one of your systems programmers about this Ensure that you have a "real" I/P address (as opposed to a router-generated I/P address) for your workstation Ensure that you know to invoke the IBM Assembler AMA90 – typically found in Linkpack Locate the files: Assembler programs: ASAM1DBG ASAM2DBG JCL: BASAM1 XASAM1 Rename the files: ASAM1DBG  ASAM1 ASAM2DBG  ASAM2 If another version of ASAM1 and ASAM2 exist, please delete them before renaming the files You will need to ftp SAMFILE to your mainframe: ftp xxx.xxx.xxx.xxx (note this is your mainframes numeric I/P address) Userid Password bin literal site recfm=fb lrecl=640 blksize=6400 put test.samfile quit To validate that everything is working: Follow the steps to modify the two JCL decks needed for this workshop (change JOB cards, library names, etc.) Recompile ASAM1/ASAM2 – using the compile JCL SAMCMPLNK Obtain your PC's static I/P address and substitute it in XASAM1.jcl – in the CEEOPTS DD card Run XASAM1 JCL in Debug Do not set any breakpoints Resume (F8) You should ABEND with an S0C7 in ASAM2 Module 6 - Debugging COBOL programs

53  Workshop – Allocate Data Sets
You will need the following development and debugging libraries: <HLQ>.xxx.ASM – example: DDS0001.TEST.ASM <HLQ>.xxx.COPYLIB – example: DDS0001.TEST.COPYLIB <HLQ>.xxx.LISTING – example: DDS0001.TEST.LISTING <HLQ>.xxx.LOAD – example: DDS0001.TEST.LOAD <HLQ>.xxx.EQALANGX – example: DDS0001.TEST.EQALANGX If you don't already have these libraries, allocate them, using  Specify characteristics by usage type:

54  Workshop – ASAM1 and ASAM2 Code Review
Load ASAM1 and ASAM2 into the editor – and review the logic in this typical z/OS data collections/editing pattern Time permitting, learn a little bit about the programs you're going to debug: Multiple windows, Outline and Filter views, navigation techniques, etc.

55  Assemble ASAM1 and ASAM2
Steps (in BASAM1.jcl): In all four job steps, modify the library names for: Assembler compiler library Your personal datasets Submit the JCL Go to the JES queue and check the return codes for each step Optionally, expand your load library and ensure that there are members for ASAM1 and ASAM2 Note – this step requires you to have allocated the datasets referenced in the JCL (see prior slide) Don't forget the 2nd LKED step

56  Workshop – Obtain your I/P Address and Port#
Switch to the Debug perspective Click on the downward pointing triangle to the right of the little green listener tool, and: Note the Port# Select and copy the I/P address Ensure that green listener tool is – in fact – green, and not red. If it's red (not listening) click it once to change it to green This is the I/P address you want!

57  Workshop – Modify and Submit the Run JCL
Open XASAM1.JCL and modify: JOB card You will have to enter your shop's specific JOB card parameters Your test dataset names: Load library SAMFILE - //CUSTFILE Paste your copied IP address – between the & and % Also verify (or change) the Port # to your RDz client listener port (recall from previous slide) Submit the job: Click Yes to enter the Debug Perspective

58  Basic Debug Techniques
Begin using the Debug Tool functions that you learned about in this section: Start by loading the Assembler source code for both modules – From the Debug Console, type: LDD ASAM1 LDD ASAM2 Press F5 – or click Step Into a few times – Hover over a few variables INREC DATALEN Try some find commands – in the ISPF command line area of ASAM1.asm From the Context menu, Filter ASAM1 Press F2 – then close the split screen Top ; f closfils last LDD ASAM1

59  Workshop – Debug Techniques – Working with Registers
Select the Registers view Step through the program – as the various Assembler statements update the register contents note the changes Right-click and Monitor one or more of the Registers

60  Workshop – Debug Techniques – Monitors
Check the Monitors view Experiment with: Change representation Change Value… Show Type Names Remove Try Detaching the Monitors view – or moving it to a different area within the Debug perspective Also experiment with: Monitor Memory

61  Workshop – Debug Techniques – Breakpoints
Set and use breakpoints From the Modules view – drill down to ASAM2 and Set an entry breakpoint Click Resume (F8) to the breakpoint Press F5 (or click Step Into) a few times Press F7 – to return to ASAM1 Resume (F8) to the entry breakpoint again (you'll stop inside of ASAM2) From inside of ASAM2 – Resume or press F8 … what happened? Press F7 – to return to line-by-line debugging of ASAM1 From the Breakpoints view – un-check (disable) the Entry breakpoint Add a few other breakpoints by either double-clicking in the prefix area – or Right-clicking over the statement and select Add Breakpoint Resume (F8) to the breakpoints while they are enabled Remove or Disable the breakpoints Right-click over INREC and select: Add Watch Breakpoint Resume (F8) - Did the program stop? Where? What's in the Debug Console view?

62  Workshop – Automonitor on Log
Tracing execution flow From the Debug Console, type: set automonitor on log Continue to step – or use: What happens in the Console? At any point, Right-click inside of the Debug Console content and select Export History Open the exported messages with Wordpad (not Notepad)

63  Workshop – Jump To Location
Branching and Debug From any executable Assembler Statement Right-click Run To Location …or… Jump To Location Combine Techniques In the program, find the line CLC EOFFLAG,=X'FF' Jump to that line Select and Monitor the EOFFLAG variable Monitor Expression What is the current value? Press F5 (or Step Into) several times From the Monitors view, change the value of EOFFLAG to X'FF' Jump back to the CLC statement Press F5 (or Step Into) again Note the flexibility of being able to iteratively test expressions

64  Workshop – Experiment !
Terminate your debug session Time permitting – submit the JCL again, and try: Set conditional breakpoints Unset/Remove breakpoints Single Remove All Submit the JCL again, try: Run to Location How does this differ from Jump to Location?

65 The RDz Workbench UNIT Topics:
Debugging z/OS Assembler Batch Applications Debugging z/OS Assembler Online Applications Appendix

66 Developing COBOL with IBM WebSphere Developer for zSeries
Topic Objectives After completing this unit, you should be able to: Using the Problem Determination Tools, Debug Option and RDz: Debug a mainframe online transaction Describe the online transaction features for configuring your 3270 sessions with Debug Option Debug a CICS 3270 Application Module 6 - Debugging COBOL programs

67 Online Debugging Overview
Developing COBOL with IBM WebSphere Developer for zSeries Online Debugging Overview Guess what? No one gets it right the first time coding online programs either  Lucky for you: Debug tool handles: CICS 3270 online transactions IMS TM online transactions Without any different debugging techniques The only difference from batch is the debug setup procedure for the online environment The z/OS-based debugging engine is provided by the IBM Debug Tool for z/OS product. It runs on the z/OS.  "Perspectives" - Recall that a "Perspective" is a convenient grouping for a collection of views organized around a given role or task So far in this class, you've used the: z/OS Projects Perspective – to develop local Assembler applications Data Perspective – to develop local Assembler applications Debug Perspective – to do source-code (line-by-line) testing of your Assembler logic Module 6 - Debugging COBOL programs

68 Steps for Online (CICS) Application Debug Session
Developing COBOL with IBM WebSphere Developer for zSeries Steps for Online (CICS) Application Debug Session Ensure that your compile proc has the necessary TEST parameter, and Compile/Link to create load module – and that your CICS application is setup for Debug Option testing Discover workstation TCP/IP parameters: IP Address Listener port# Access and login to your CICS region – Green Screen Use the DTCN view, or execute the DTCN transaction and specify: Terminal ID Transaction code and programs – to put under Debug control User-ID TCP/IP parameters: Port# Save the DTCN transaction specification Debug your CICS application There is also IBM Rational Developer Debugger for System z Version 7.0 which is an affordably priced subset of IBM Rational Developer for System z functions that is designed to provide a workstation-based graphical interface to IBM Debug Tool and IBM Debug Tool Utilities and Advanced Functions. This product is specifically designed for developers who do not require the full-function Rational Developer for System z product. The functions listed on this page are available in both the Rational Developer for System z and Rational Developer Debugger for System z products. Module 6 - Debugging COBOL programs

69 1. Compile JCL Requirements for Using Debug Tool
Developing COBOL with IBM WebSphere Developer for zSeries 1. Compile JCL Requirements for Using Debug Tool Use the TEST compiler option to prepare your executable Assembler program for use with the debugger. The TEST option is required for remote debugging. It produces symbol and statement information that enables the debugger to perform symbolic source-level debugging Enterprise Assembler 3.4: TEST(NONE,SYM,SEP) Enterprise Assembler V4.1 +: TEST(NOHOOK,SEP,EJPD) Include the DD card for your SYSDEBUG dataset in the Assembler Compile step In traditional compile JCL – this would be in the IGYCTRL step If you are not using the IBM/RDz compile PROCs for building your applications, be sure to override the compiler option and add TEST - as shown Transition statement: The following slide shows how to set the compiler options in the workbench. Omitting the TEST option is the same effect as specifying the NOTEST compiler option. Module 6 - Debugging COBOL programs

70 2. Discover TCP/IP address and RDz Port - Review
Developing COBOL with IBM WebSphere Developer for zSeries 2. Discover TCP/IP address and RDz Port - Review Open the Debug Perspective Click the small downward pointing triangle next to the debug-daemon icon Note the Port# Select: Get Workstation IP… Copy the IP address Either paste the IP address into Notepad, or write it down That shows this pull-down menu that displays the listening port. In this example it is port number 8000, but yours may be different. Just so you know, you can configure RDDz so that it uses a different port if you prefer. Next, click on “Get workstation IP”. Note: Your RDz Port# will most likely be set once, and will change infrequently. However, depending on your installation's setup, your workstation's TCP/IP address could change - often Module 6 - Debugging COBOL programs

71 3. Setup the DTCN Parameters Using the DTCN View
If you are using RDz v7.6.1 or higher, you can utilize an RDz view to setup your DTCN CICS Debug properties. Steps: From Window > Show View > Other type: DTCN and select DTCN Profiles Right-click inside the new, empty view and select: Create From the DTCN profiles window: Enter your User ID Click DTCN Preferences From DTCN preferences specify: Host Name/IP Address CICS DTCN transaction port CICS login credentials: User ID Password Other fields as shown  Click Test Connection Click OK to check your work

72 Setup the DTCN Parameters Using the DTCN View – continued
From DTCN profiles click Next > From DTCN pattern matching specify : Terminal ID: * Transaction ID (Trancode)  Click Add, and specify the Compile Units (Load Module names) Click Next > From DTCN TEST run-time specify: Fields as shown  Session Address (your workstation I/P address) Port (your listener Debug Tool listener port) Other fields – as shown  Click Finish DTCN Profiles will be populated with entries for all users connecting into that CICS region

73 Using the DTCN View Once you have setup the DTCN View, you can: Activate the profile This modifies the CICS System Tables dynamically, through the Debug Tool facilities – and allows you to debug CICS transactions Other options include: Edit the profile – and change your I/P address After you reboot your machine Delete the profile Create a new profile Refresh the display of DTCN entries in the region Note: In order to debug CICS programs you will have to launch a 3270 emulation session (next slides) to kick off the transaction

74 3. Login to your CICS Region
Developing COBOL with IBM WebSphere Developer for zSeries 3. Login to your CICS Region From Remote Systems Explorer: Right-click Select: Host Connection Emulator Select your CICS application Enter your Userid and Password and sign in There is also IBM Rational Developer Debugger for System z Version 7.0 which is an affordably priced subset of IBM Rational Developer for System z functions that is designed to provide a workstation-based graphical interface to IBM Debug Tool and IBM Debug Tool Utilities and Advanced Functions. This product is specifically designed for developers who do not require the full-function Rational Developer for System z product. The functions listed on this page are available in both the Rational Developer for System z and Rational Developer Debugger for System z products. Module 6 - Debugging COBOL programs

75 3. Setup the Debug Option Parameters using DTCN Transaction – 1 of 2
Developing COBOL with IBM WebSphere Developer for zSeries 3. Setup the Debug Option Parameters using DTCN Transaction – 1 of 2 If you did NOT use the DTCN view to enter your DTCN properties you can do so using a CICS Transaction (green screen) From CICS (after signing in): Clear the screen, Enter: DTCN – and press  Enter From the DTCN screen Press F10 – this will fill in the Terminal Id for your workstation Note that you can also type an asterisk: * …as the Terminal Id There is also IBM Rational Developer Debugger for System z Version 7.0 which is an affordably priced subset of IBM Rational Developer for System z functions that is designed to provide a workstation-based graphical interface to IBM Debug Tool and IBM Debug Tool Utilities and Advanced Functions. This product is specifically designed for developers who do not require the full-function Rational Developer for System z product. The functions listed on this page are available in both the Rational Developer for System z and Rational Developer Debugger for System z products.  Note: You would only use the DTCN transaction to specify your Debug Option properties if you could not use the DTCN view (prior slides) Module 6 - Debugging COBOL programs

76 3. Setup the Debug Option Parameters using DTCN Transaction – 2 of 2
Developing COBOL with IBM WebSphere Developer for zSeries 3. Setup the Debug Option Parameters using DTCN Transaction – 2 of 2 DTCN transaction data entry screen Enter the Tran-code Transaction ID Enter up to eight specific Program Id(s) you wish to debug through …or… Enter wildcard text for the Program Id(s) Ex. CD* Enter your User-ID Session Type: TCP Port Number: from your Debugger look-up Display ID: Your TCP/IP address, from your Debugger look-up (note that you can not paste into this 3270, screen) Press F4 to save your debug profile Press F3 to clear the screen There is also IBM Rational Developer Debugger for System z Version 7.0 which is an affordably priced subset of IBM Rational Developer for System z functions that is designed to provide a workstation-based graphical interface to IBM Debug Tool and IBM Debug Tool Utilities and Advanced Functions. This product is specifically designed for developers who do not require the full-function Rational Developer for System z product. The functions listed on this page are available in both the Rational Developer for System z and Rational Developer Debugger for System z products. Module 6 - Debugging COBOL programs

77 Developing COBOL with IBM WebSphere Developer for zSeries
4. Start Debugging From the CICS region Enter the Tran-code Press  Enter Click: Yes at the Confirm Perspective Switch There is also IBM Rational Developer Debugger for System z Version 7.0 which is an affordably priced subset of IBM Rational Developer for System z functions that is designed to provide a workstation-based graphical interface to IBM Debug Tool and IBM Debug Tool Utilities and Advanced Functions. This product is specifically designed for developers who do not require the full-function Rational Developer for System z product. The functions listed on this page are available in both the Rational Developer for System z and Rational Developer Debugger for System z products. Module 6 - Debugging COBOL programs

78 Developing COBOL with IBM WebSphere Developer for zSeries
4. Start Debugging Debug as previously learned in the batch/remote and Local debug units. There is also IBM Rational Developer Debugger for System z Version 7.0 which is an affordably priced subset of IBM Rational Developer for System z functions that is designed to provide a workstation-based graphical interface to IBM Debug Tool and IBM Debug Tool Utilities and Advanced Functions. This product is specifically designed for developers who do not require the full-function Rational Developer for System z product. The functions listed on this page are available in both the Rational Developer for System z and Rational Developer Debugger for System z products. Module 6 - Debugging COBOL programs

79 What Happens for Calls and Screen-IO? – 1 of 2
Developing COBOL with IBM WebSphere Developer for zSeries What Happens for Calls and Screen-IO? – 1 of 2 You will be prompted, and presented with debug-run-time options There is also IBM Rational Developer Debugger for System z Version 7.0 which is an affordably priced subset of IBM Rational Developer for System z functions that is designed to provide a workstation-based graphical interface to IBM Debug Tool and IBM Debug Tool Utilities and Advanced Functions. This product is specifically designed for developers who do not require the full-function Rational Developer for System z product. The functions listed on this page are available in both the Rational Developer for System z and Rational Developer Debugger for System z products. Module 6 - Debugging COBOL programs

80 What Happens for Calls and Screen-IO? – 2 of 2
Developing COBOL with IBM WebSphere Developer for zSeries What Happens for Calls and Screen-IO? – 2 of 2 If your current transaction ends, and a BMS or 3270 screen is sent: You will be notified (prompted) by the debug engine If a screen is sent, the 3270 will display in the content area There is also IBM Rational Developer Debugger for System z Version 7.0 which is an affordably priced subset of IBM Rational Developer for System z functions that is designed to provide a workstation-based graphical interface to IBM Debug Tool and IBM Debug Tool Utilities and Advanced Functions. This product is specifically designed for developers who do not require the full-function Rational Developer for System z product. The functions listed on this page are available in both the Rational Developer for System z and Rational Developer Debugger for System z products. Module 6 - Debugging COBOL programs

81 What About PF-Keys and Other Data Entry?
You can resize the screen portion of the debugger And use the PF-Key emulation options in the Host Connection

82 Developing COBOL with IBM WebSphere Developer for zSeries
Topic Objectives After having completed this unit, you now should be able to: Using the Problem Determination Tools, Debug Option and RDz: Debug a mainframe online transaction Describe the online transaction features for configuring your 3270 sessions with Debug Option Debug a CICS 3270 Application Module 6 - Debugging COBOL programs

83 Larry's Notes ALC Debugging 1. GPR front and center (how??)
Tabbed view - Registers If running Assembler ==> 12 points to CAA (main control block for all HLLanguages) DSA (reg. 13 points to) Dynamic Storage Area De-reference (?) Address values inside the registers "show me what this is pointing at" De-reference pointer values inside of memory Linked List Storage View - De-reference "show me storage this address is pointing at" go to that address, show me what's there W1 Fwd W2 Back LNAME FNAME DSECT "structure" (like a Assembler group field - like a map over storage). C struct, PL/I Structure Technique (laborious) create XML file that mimic'd DSECT Associate DSECT with storage Can have symbolic representation as you move through the Linked List Register Tab (%GPR1 --> F) ... can put conditionals around (break points)?


Download ppt "RDz Workbench – Debugging z/OS Assembler Applications"

Similar presentations


Ads by Google