® IBM Software Group © 2011 IBM Corporation RDz Workbench – Debugging z/OS COBOL Applications Batch COBOL Debugging Workshop Jon Sayles, Rational System.

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

Stored procedures and views You can see definitions for stored procedures and views in the demo databases but you can’t change them. For views, expand.
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Tutorial on Basic Usage
Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
Utilizing the GDB debugger to analyze programs Background and application.
1 Appendix A: Writing and Submitting SAS ® Programs A.1 Writing and Submitting SAS Programs.
Lab6 – Debug Assembly Language Lab
Technical Support: (989) GIS and Mapping Procedures in ArcMap 9.x Creating an ArcMap Project Editing an ArcMap Project Printing an ArcMap Project.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
Visual Basic Debugging Tools Appendix D 6/27/20151Dr. Monther Aldwairi.
LAUNCHXL2-RM57L – Project 0
Getting Started with Colleague Studio Debugger Presented by:Katie Morgan Pacific University August, 2014.
CS 2511 Fall  Windows:  Start->Specialized Academic Software- >Programming Languages->NetBeans->NetBeans IDE x.y.z  where x.y.z is a version.
® IBM Software Group © 2008 IBM Corporation Rational Developer for System z User Group Kickoff.
Ch 9 Managing Active Directory User Accounts. Objectives Create Organizational Unit Creating User Accounts in Active Directory Disabling, Enabling, and.
® IBM Software Group © 2006 IBM Corporation The Eclipse Data Perspective and Database Explorer This section describes how to use the Eclipse Data Perspective,
Eclipse IDE. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as teaching.
1 Chapter Overview Creating User and Computer Objects Maintaining User Accounts Creating User Profiles.
DEMONSTRATION FOR SIGMA DATA ACQUISITION MODULES Tempatron Ltd Data Measurements Division Darwin Close Reading RG2 0TB UK T : +44 (0) F :
Introduction Purpose Objectives Content Learning Time
Configuring the MagicInfo Pro Display
® IBM Software Group © 2013 IBM CorporationLast Update: August 2013 Workshops RDz Workbench – Using the Data Source Explorer Workshops.
® IBM Software Group © 2006 IBM Corporation Enterprise COBOL Education Using Rational Developer for System Z RDz Workbench and z/OS Development Jon Sayles,
| | Tel: | | Computer Training & Personal Development Outlook Express Complete.
RDz Workbench – Debugging z/OS Assembler Applications
Teacher’s Assessment Assistant Worksheet Builder Starting the Program
RDz Workbench – Debugging z/OS COBOL Applications
CPS120: Introduction to Computer Science Compiling Your Programs Using Visual C++
GDT Development Tutorial. GDT Development Tutorial Doug Evans and Detlef Lexut GDT 2008 International User Conference August 10 – 13  Lake Las Vegas,
Playing Back Scripts In HP LoadRunner >>>>>>>>>>>>>>>>>>>>>>
Microsoft Office 2007 Access Chapter 6 Using Macros, Switchboards, PivotTables, and PivotCharts.
Debugging. 2 © 2003, Espirity Inc. Module Road Map 1.Eclipse Debugging  Debug Perspective  Debug Session  Breakpoint  Debug Views  Breakpoint Types.
Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.
Active-HDL Interfaces Debugging C Code Course 10.
VB – Debugging Tools Appendix D. Why do we need debugging? Every program has errors, and the process of finding these errors is debugging Types of errors.
® IBM Software Group Appendix C - Code Reuse - Program Templates - Code Snippets - Code Templates.
9/2/ CS171 -Math & Computer Science Department at Emory University.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of The Eclipse debugger.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Access Project 7 Advanced Report and Form Techniques.
Lecture 31 Creating Executable Programs on the Mainframe Tuesday, January 20, 2009.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
Debugging Visual Basic.NET Programs ► ► Use debugging tools ► ► Set breakpoints and correct mistakes. ► ► Use a Watch and Local window to examine variables.
Slide 1 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Task 2 Briefing The Design of a Computer.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
® IBM Software Group © 2006 IBM Corporation EGL/Web Project QuickStart – 1 of 4 – Creating the Data Access Layer These slides walk you through the process.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 What we'll cover here l Using the debugger: Starting the debugger Setting.
®® Microsoft Windows 7 Windows Tutorial 2 Organizing Your Files.
TOOLS FOR DESIGN AND DEVELOPMENT ENVIRONMENTS. Case study - ECLIPSE Lecture notes 5.
GDT Tips and Tricks. GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July  Tucson, Arizona GDT Tips.
IBM Rational Services © 2013 IBM Corporation Software Configuration Management Using the RTC Eclipse Client Bruce Besch (Version 1.0)
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
Editing and Debugging Mumps with VistA and the Eclipse IDE Joel L. Ivey, Ph.D. Dept. of Veteran Affairs OI&T, Veterans Health IT Infrastructure & Security.
© 2014 IBM Corporation e-config RPO MES Training Bill Luken September 29 th, 2014 Global Client Value.
Programming and Debugging with the Dragon and JTAG Many thanks to Dr. James Hawthorne for evaluating the Dragon system and providing the core content for.
® IBM Software Group © 2006 IBM Corporation Create EGL/JSF HelloWorld Pages This learning module walks you through the process of creating two simple “hello.
Programming and Debugging with the Dragon and JTAG
 Create a Local Workstation Project
Debugging Dwight Deugo
XINFO – Eclipse RDz Plugin
PRU-ICSS Programming with CCS
Important terms Black-box testing White-box testing Regression testing
Important terms Black-box testing White-box testing Regression testing
DEBUGGING JAVA PROGRAMS USING ECLIPSE DEBUGGER
Software Setup & Validation
Using screens and adding two numbers - addda.cbl
Debugging Dwight Deugo
ECE 3567 Microcontrollers Lab
Presentation transcript:

® IBM Software Group © 2011 IBM Corporation RDz Workbench – Debugging z/OS COBOL Applications Batch COBOL Debugging Workshop Jon Sayles, Rational System z Products -

2 Using this PowerPoint Slide Deck There are two types of slides in this PowerPoint: 1.Workshop slides:  These are slides that will help you master RDz through technical development techniques and hands-on exercises  Workshop slides have this character:  in the slide header –Note that some workshop slides have the word "Workshop" in the slide header –However all workshop slides have the  character in the slide header 2.Learning content:  Any slide that doesn't contain a  character in the slide header contains conceptual learning material –To be read for understanding –Often these slides are preparation for the workshop exercises that follow There are additional Powerpoint slides that contain deep RDz learning content, without exercises and without lab instructions  Ifyou want to learn more about any particular RDz topic, you can learn more about it from the Powerpoint slides.

3 Pre-Workshop Overview  You will use Debug Tool to test the SAM1 and SAM2 batch COBOL 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 Ctrl+2  At any point, you can terminate your debug session by clicking the Red icon or pressing Ctrl+2  And you can re-submit the JCL again – to Debug (again)

4  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 COBOL.VnRn.COBOL - COBOL.V3R4.COBOL  Ensure that you know the location (system library) of the COBOL compiler IGYCRCTL – typically found in: COBOL.VnRn.COBOL - Example: COBOL.V3R4.COBOL  Locate the files:  COBOL programs:  SAM1  SAM2  COBOL copybooks:  TRANREC  CUSTCOPY  JCL:  SAMCMPLK  XSAM  You will need access to a QSAM test data file: SAMFILE.TEST1.SAMFILE  This file is in the \data folder of your RDzClass.zip file – that you used to setup for these workshops. You will need to transfer the file to the mainframe, ensuring its DSORG/LRECL/BLKSIZE is maintained SAMFILE properties

5 You will need the following standard development libraries for Compile/Link-Edit: .xxx.COBOL – example: DDS0001.TEST.COBOL .xxx.COPYLIB – example: DDS0001.TEST.COPYLIB .xxx.LISTING – example: DDS0001.TEST.LISTING .xxx.OBJ – example: DDS0001.TEST.OBJ .xxx.LOAD – example: DDS0001.TEST.LOAD If you haven't already allocated these libraries, pleas allocate them now. Hint:  Specify characteristics by usage type:  Will allow you to select the correct DCB for the files  Give each dataset 5 primary and 5 secondary TRKS of disk space  Workshop – Allocate Data Sets

6  Workshop – SAM1 and SAM2 Code Review  Load both SAM1.cbl and SAM2.cbl into the editor – and review the logic in this typical z/OS data collections/editing/report writing pattern  Time permitting, learn a little bit about the programs you're going to debug, using a few of the RDz code analysis tools & techniques:  Multiple editing windows to study the logic, Program Control Flow, Perform Hierarchy, navigation techniques, Hover, etc.

7  Workshop – Compile SAM1 and SAM2  Steps (in SAMCMPLK.jcl): four  In all four job steps, modify the library names for:  COBOL 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 SAM1 and SAM2  Note – this step requires you to have allocated all of the datasets referenced in the JCL (see prior slide) Don't forget the 2 nd LKED step

8  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  Workshop – Obtain your I/P Address and Port# This is the I/P address you want!

9  Open XSAM.JCL and modify:  JOB card  You will have to enter your shop's specific JOB card parameters  Your test dataset names:  Load library  The SAMFILE dataset DSN //CUSTFILE DD DSN=… &%  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: Yes Click Yes to enter the Debug Perspective  Workshop – Modify and Submit the Run JCL

10  Begin using the Debug Tool functions that you learned about in this section:  Press F5 – or click Step Into a few times – note that the Outline view synchronizes with your source  Right-click over variable in Variables – and select 2. Automonitor Previous – step a few more times  Hover over a variable in the PROCEDURE DIVISION  Try some find commands – in the ISPF command line area of SAM1.cob  Navigate around the source code using the Outline view  Press F6 – a few times. It will act the same as F5 until you get to a CALL statement  Workshop – Debug Techniques – Stepping  Hover over a variable

11  Change some values:  From the Variables tab:  Filter Locals > 0 ALL –What does this do?  Click inside a variable and change its value  Press  Enter to save your change  Change the representation of several fields to Hexadecimal  Try editing in Hex –Change a binary numeric field value to negative –Etc.  Workshop – Debug Techniques – Variables

12  From within Variables  Select Monitor Local Variable Monitors  Check the Monitors view  Experiment with:  Change representation  Change Value…  Show Type Names  Remove  Workshop – Debug Techniques – Monitors

13  Workshop – Monitors (more techniques)  From Monitors  Select Detached  Drag the Monitors view around to make the best use of "screen real estate"

14  Set and use breakpoints  Find the CALL to 'SAM2'  Add a breakpoint by either:  Double-clicking in the prefix area – or:  Right-click over the statement and select Add Breakpoint  Resume (F8) to the breakpoint  Click into 'SAM2'  RDz will take a few seconds to load SAM2  Debug into the program a few clicks  Press F7 – to return to 'SAM1'  Resume (F8) to the breakpoint  Press F6 – What does this do?  Answer – runs all of the code in SAM2, and stops at the Next Sequential Instruction after the call  Double-click on TRAN-KEY to select the field  Right-click and select: Add Watch Breakpoint  Resume (F8) until the value in TRAN-KEY changes, and the breakpoint causes your program to stop  Workshop – Debug Techniques – Breakpoints

15  Terminate your debug session  Submit XSAM JCL again  Remove all Breakpoints  Add a Breakpoint to the PERFORM 720… statement in 200-PROCESS-UPDATE-TRAN  Edit that Breakpoint, and make it conditional  At the wizard click Next >  Specify the following Expression:  Click Finish  Resume(F8) - you should stop at the conditional Breakpoint on line 404  Click the Debug Console view – to verify  Workshop – Debug Techniques – Breakpoints continued

16  Terminate your debug session  Submit XSAM JCL again  Remove all Breakpoints  From the Debug Console issue the following Debug Engine Command: set automonitor on log  Click Animated Step Into  Follow the trace in the Debug Console  Click Animated Step Into  Optional:  Right-click in the Debug Console and Export History – for your debug trace  Workshop – Debug Techniques – Breakpoints continued

17  Branching and testing  Use the Outline view to navigate to 730-READ-CUSTOMER-FILE  Right click on the EVALUATE statement and in the prefix area (on the left) select Jump to Location  What did this do?  Answer: Set the current instruction pointer to the line  Mouse over WS-CUSTFILE-STATUS and note its current value  Double-click WS-CUSTFILE-STATUS and select Monitor Expression  From the Monitors view, change the value of the field to 04  Step through the code, what happens?  Answer #1: Program execution "falls thru" – why?  Answer #2: Jump To Location breaks the logic out of the "Perform chain" (dependent PERFORM'd paragraphs) routines in your paragraph logic  Return to the EVALUATE statement via Jump To Location 09  From the Monitors view, change the value of WS-CUSTFILE-STATUS to 09  Step through the code – note the logic flow  Terminate your debug session  Workshop – Jump To Location

18  Time permitting – submit the JCL again, and try:  Setting conditional breakpoints  Unsetting breakpoints  Uncheck the box  Single  Remove All  Run until SAM2 abends  Click  Examine  Click OK  What does Examine do?  Submit the JCL again, use:  Run to Location  How does this differ from Jump to Location?  Workshop – Experiment !

19  Workshop – Optional Workshop (force an ABEND) If your debugging hasn't yet hit an ABEND condition, try forcing one by doing the following:  From SAM1.cbl  Add these two variables in the WORKING-STORAGE SECTION.  Add these two statements in 710-READ-TRAN-FILE.   Save your changes to SAM1.cbl  Submit SAMCMPLK.jcl – check the return codes in JES  Submit XSAM.jcl, and from your Debug session:  Set a breakpoint at MOVE SPACES TO ABEND-TEST.  (F8) Resume to the breakpoint. (F5) Step into the ABEND  Click  Examine