Your SlideShare is downloading. ×
0
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Development of Local COBOL Programs
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Development of Local COBOL Programs

2,543

Published on

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,543
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
62
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs Ed Steele – Version 1, 06/23/2009
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • 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 COBOL applications Data Perspective – to develop local COBOL applications Debug Perspective – to do source-code (line-by-line) testing of your COBOL logic
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs Fault Analyzer for z/OS supports applications running under z/OS and OS/390 in the following environments: COBOL PL/I  Assembler C/C++ Language Environment UNIX System Services CICS®   IMS DB2®  WebSphere®  WebSphere MQ Java You do not have to make any changes at all to existing programs to allow Fault Analyzer to produce an analysis of any fault. Nor do you have to recompile programs.
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs The Fault Analyzer Perspective Fault History File (Add New, Fault History file). It originates when a program abend occurs on the host. The complied source is saved in PDS and matched against the Fault History file to obtain the program statement (line number) where the abend occurs. The Lookup View is used to search / look up the abend code. For example, what is a SOC4, SOC7, etc..... If the correct LANGX file was available during the real-time analysis, you can click on the line number to jump to the source of the abending program. Checkpoint Solutions: 1. Remote System Explorer and z/OS Projects perspectives 2. In the Remote Systems view, under New Connection: i. Click the ‘+’ in front of z/OS … ii. Right-click z/OS … then select New Connection from the pop-up dialog 3. Locate the relevant job under the filter My Jobs in JES file system, then double-click the job to display it in the editor
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs
  • Connecting to a z/OS host from the workbench Module 4 - Development of Local COBOL Programs However – If you need any help, from within edit on HOSPCALC, do a Find ALL on: *RDZ - this will isolate the lines you will need to fix to solve the ABENDs
  • Transcript

    1. RDz Workbench – Integration with Fault Analyzer Jon Sayles/IBM Rational Eco System Team
    2. IBM Trademarks and Copyrights <ul><ul><li>© Copyright IBM Corporation 2007,2008, 2009. All rights reserved. </li></ul></ul><ul><ul><li>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. </li></ul></ul><ul><ul><li>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. </li></ul></ul><ul><ul><li>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. </li></ul></ul>
    3. Course Contributing Authors <ul><li>Thanks to the following individuals, for assisting with this course: </li></ul><ul><ul><li>Russ Courtney/IBM </li></ul></ul><ul><ul><li>Reginaldo Barosa/IBM-Rational </li></ul></ul><ul><ul><li>David Bean/IBM-Rational </li></ul></ul><ul><ul><li>Ed Steele/IBM-Rational </li></ul></ul><ul><ul><li>Dave Willsey/IBM-Rational </li></ul></ul>
    4. Course Overview <ul><li>Audience </li></ul><ul><ul><li>This course is designed for application developers who have learned or programmed in COBOL, and who need to do z/OS Traditional Development and Maintenance as well as build leading-edge applications using COBOL and Rational Developer for System z. </li></ul></ul><ul><li>Prerequisites </li></ul><ul><ul><li>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 COBOL and z/OS. </li></ul></ul><ul><ul><li>Knowledge of SQL (Structured Query Language) is assumed for database access is assumed as well. </li></ul></ul><ul><ul><li>Basic PC and mouse-driven development skills, terms and concepts are also assumed. </li></ul></ul>
    5. Course Topics <ul><li>Course Name: Rational Developer for System z Foundation Training </li></ul><ul><li>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 </li></ul><ul><li>Pre-requisites: Some experience developing COBOL applications using z/OS is expected. A working knowledge of SQL is also recommended. </li></ul><ul><li>Course Length: ~ 5days – or if done in self-paced mode, at your own pace </li></ul><ul><li>Topics (Agenda) </li></ul><ul><ul><ul><li>Getting Started - installing and configuring RDz - and the course materials, and using Eclipse </li></ul></ul></ul><ul><ul><ul><li>The RDz Workbench </li></ul></ul></ul><ul><ul><ul><ul><li>Code analysis tools </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Editing </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Compiling programs </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Debugging local COBOL programs </li></ul></ul></ul></ul><ul><ul><ul><li>The Data Perspective: </li></ul></ul></ul><ul><ul><ul><ul><li>Working with relational data sources </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Modifying test data </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Editing and testing SQL statements </li></ul></ul></ul></ul><ul><ul><ul><li>Working with remote system resources: </li></ul></ul></ul><ul><ul><ul><ul><li>Connecting to a mainframe </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Data management </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Accessing and editing files </li></ul></ul></ul></ul><ul><ul><ul><li>z/OS Application Development </li></ul></ul></ul><ul><ul><ul><ul><li>Creating MVS Subprojects </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Creating and customizing project properties </li></ul></ul></ul></ul><ul><ul><ul><li>Debugging z/OS Applications </li></ul></ul></ul><ul><ul><ul><ul><li>Debugging Batch Applications </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Setting Debug Tool for Online Applications </li></ul></ul></ul></ul><ul><ul><ul><li>Working with File Manager </li></ul></ul></ul><ul><ul><ul><ul><li>Creating test data </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Editing complex file-types </li></ul></ul></ul></ul><ul><ul><ul><li>Working with mainframe ABENDs using Fault Analyzer </li></ul></ul></ul><ul><ul><ul><ul><li>Creating Fault History views </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Analyzing and solving mainframe ABENDs </li></ul></ul></ul></ul><ul><ul><ul><li>Creating and modifying BMS Maps using the BMS Map Editor </li></ul></ul></ul>
    6. The RDz Workbench UNIT Topics: <ul><li>Analyzing Mainframe Abends </li></ul><ul><li>ABEND Codes and Reasons </li></ul><ul><li>Using IBM's Fault Analyzer </li></ul><ul><li>Appendix </li></ul>
    7. Unit objectives <ul><li>After completing this unit on Production Support/Application Testing/Software Defect and IBM Mainframe COBOL ABEND Research, you should be able to: </li></ul><ul><ul><li>Define the steps in a generalized methodology of ABEND resolution </li></ul></ul><ul><ul><li>List the various sources of ABEND inputs, including: </li></ul></ul><ul><ul><ul><li>PD Tools documents </li></ul></ul></ul><ul><ul><ul><li>Other sysout </li></ul></ul></ul><ul><ul><ul><li>Dynamic trace facilities </li></ul></ul></ul><ul><ul><li>List the common types of COBOL program ABENDS </li></ul></ul>
    8. ABEND Overview <ul><li>When an application ABEND ( AB normal END -of-job) occurs, z/OS stops executing your program, closes files and buffers and generates a single high-level message in the form of a System Completion Code (Sxxx). </li></ul><ul><li>The System Completion Code is usually written to an output listing file through your //SYSOUT DD * JCL entry. </li></ul><ul><li>This completion code indicates why the system has decided to stop executing your application. </li></ul><ul><li>It is related to, but often only loosely related to what is really wrong with your application </li></ul><ul><li>Because of this the System Completion Code represents the starting point for your analysis of the problem. </li></ul>She won't be laughing when she gets back to her desk and finds out that last night's production jobs blew sky high!
    9. Debugging Assistance <ul><li>Along with the System Completion Code, using IBM’s Problem Determination tools (PD Tools) Fault Analyzer you can obtain various reports which describe What/Where and How the ABEND occurred. </li></ul><ul><li>Valuable information contained in the Fault Analyzer report-files includes: </li></ul><ul><ul><li>The System Completion Code (and often a short text description of what it designates) </li></ul></ul><ul><ul><li>A short explanation of the cause of the ABEND </li></ul></ul><ul><ul><li>The COBOL instruction (statement) or line number, which contained the invalid operation causing z/OS to halt execution </li></ul></ul><ul><ul><li>Variables of interest – and code surrounding the instruction that halted execution </li></ul></ul><ul><ul><li>A &quot;core-dump&quot; (a hexadecimal printout) of the internal machine storage and registers relevant to the areas of your program surrounding the COBOL instruction which caused z/OS to halt execution. </li></ul></ul><ul><li>This information is critical to begin understanding and researching the problem, but it is sometimes insufficient to solve the underlying application problem, which could be any combination of: </li></ul><ul><ul><li>Incomplete, incorrect or invalid COBOL procedural logic </li></ul></ul><ul><ul><li>A typo such as a misplaced period, or incorrectly specified field </li></ul></ul><ul><ul><li>Incorrect or invalid input data </li></ul></ul><ul><ul><li>Batch jobs run out of sequence </li></ul></ul><ul><ul><li>Input files missing or corrupted (hardware errors) </li></ul></ul><ul><ul><li>Errors which relate to JCL problems </li></ul></ul><ul><ul><li>etc. </li></ul></ul>
    10. Getting Started <ul><li>There are as many different ways to analyze and research COBOL ABENDs as there are individual approaches to writing procedural logic. However, if you've never done software production support work, consider starting with the following structured problem-solving approach: </li></ul><ul><ul><li>Preparation </li></ul></ul><ul><ul><li>Research </li></ul></ul><ul><ul><li>Hypothesis </li></ul></ul><ul><ul><li>Solution </li></ul></ul><ul><ul><li>Resolution </li></ul></ul><ul><li>As a final note before we begin discussing the above, understand that there are often two distinct phases of application Production Support: </li></ul><ul><ul><li>1. Data Center “on-call” ABEND resolution - wherein a technician receives notification that a job or transaction has ABEND’d and must be &quot;fixed&quot; within an extremely short timeframe (usually minutes to hours). In this case, the technician's main concern is to &quot;patch&quot; the problem - get the system back online, or get the batch job-stream back into production (&quot;Patch-It&quot;). </li></ul></ul><ul><ul><li>2. NextDay problem resolution - wherein technician(s) actually track down and solve the problem that caused the ABEND (&quot;Fix-It&quot;). </li></ul></ul><ul><li>The steps that follow represent a structured approach to &quot;FixIt&quot; – in that they go well beyond the scope of the emergency measures used to &quot;patch&quot; the problem during an OnCall emergency. </li></ul>
    11. 1. Preparation and Information Gathering – 1 of 2 <ul><li> Collect all necessary background information on the ABEND. WHAT happened, WHERE the ABEND occurred and HOW the ABEND occurred: </li></ul><ul><li> </li></ul><ul><ul><li>Start with Fault Analyzer's reports – as they contain a broad and deep set of formatted, structured, analysis information </li></ul></ul><ul><ul><li>Collect additional supporting ABEND output (SYSOUT) from the job, DISPLAY statements, etc.) </li></ul></ul><ul><ul><li>Obtain copies of the run-time: </li></ul></ul><ul><ul><ul><li>JCL </li></ul></ul></ul><ul><ul><ul><li>Program source </li></ul></ul></ul><ul><ul><ul><li>All copybooks (or expanded source listings) </li></ul></ul></ul>
    12. 1. Preparation and Information Gathering – 2 of 2 <ul><li>If batch, from the JCL learn the dataset names of input and output files </li></ul><ul><li>accessed by the program (which you may need to browse as part of your research) </li></ul><ul><li>Learn the nature of the batch job from system documentation, or from an application business expert (at least at the level of module-flow and file-access) </li></ul>RAA Batch Job Diagram  showing datasets being passed from step to step
    13. Research – Analyze the Gathered ABEND Data <ul><li>From the preparation step, construct a mental map (understanding) of the program's execution (HOW the ABEND occurred - which will start you down the path of research to understand &quot;WHY&quot; the ABEND occurred </li></ul><ul><li>WHY determination usually requires a combination of &quot;Static&quot; and &quot;Dynamic&quot; analysis - complementary research and investigative approaches. </li></ul><ul><li>These steps need not be followed in this order. Rather, in time you will develop an &quot;intuition&quot; as to which kind(s) of analysis will be most likely to provide the information you need to solve your problem. </li></ul><ul><li>To assist, you can use application research and analysis tools such as </li></ul><ul><ul><ul><li>IBM’s Rational Asset Analyzer , Rational Developer for System z – Static Analysis </li></ul></ul></ul><ul><ul><ul><li>IBM's Debug Tool or CICS I.A. – Dynamic Analysis </li></ul></ul></ul><ul><li>So – if the reason &quot;why&quot; the ABEND occurred is not apparent at this point, perform Static and/or Dynamic Analysis on the specific areas of the application relating to the ABEND. </li></ul><ul><li>Note: Recompiling old COB2 programs with Enterprise COBOL can create many of these problems, even though &quot;Nothing has changed in the program&quot; </li></ul>
    14. Static Analysis – Overview of Techniques <ul><li>1. Structural Visualization: is the generation of an accurate mental map, understanding or mental image of the program's control structure, or logic-architecture. Using the starting point represented by the ABEND condition (the statement which caused z/OS to halt execution) and using electronic-assisted tools (such as IBM’s Rational Asset Analyzer or Rational Developer for System z), build an accurate understanding of the code invocation at: </li></ul><ul><ul><li>The module/file level (System View) - Paragraph/Section level (Hierarchy chart) - Statement level (Flow chart) </li></ul></ul><ul><li>Structural Visualization can done be &quot;top-down&quot;, by asking open-ended questions; such as learning how a particular routine &quot;hangs-together logically&quot;, or it can be used &quot;bottom-up&quot;, by asking specific close-ended questions about a program, such as &quot;How does this particular paragraph get executed?&quot; &quot;How did this module get invoked?&quot; </li></ul><ul><li>2. Data Flow Analysis: A combination of control structure analysis and data item analysis, which seeks to determine the usage of particular fields throughout a program. Data flow analysis is used to determine (from a given instance of a data item) where the next occurrences of that item exist in your program, and how the data item is used; (as a receiving field in a MOVE or mathematical operation, as the sending field in a MOVE statement, as part of a logic-branch (IF, PERFORM UNTIL/VARYING, etc.). </li></ul><ul><li>3. Data Impact Analysis: An expansion of Data Flow Analysis which traces the movement of data from field-to-field throughout a program, or throughout an entire application; including I/O (screens and files). Using Data Impact Analysis, you can identify all fields that might have had an impact on the contents of a field (before the ABEND occurred). And just as importantly - you can learn the affect changing this field will have on the behavior of the application. </li></ul><ul><li>4. Textual or Data Item Usage: Utilized more for application maintenance and enhancement requests, this type of Static Analysis involves searching for &quot;categories&quot; of program-items, such as &quot;List all fields that contain *JUL*, *GREG*, *YR*, *YEAR* (suspect date candidates for Year2000 conversion), or list all such fields with two digits (numeric) or two-byte (alphanumeric) definitions. </li></ul><ul><li>5. Code Partitioning: Again, utilized more for application maintenance, enhancements and application reengineering, Code Partitioning involves mentally organizing and analyzing code by function or process, such that you understand and can distinguish the usage of code by business process. For example: Find all code that relates to the calculation of premium renewal payments … or… Isolate the code that edits a particular file, with an eye towards creating a shared subroutine from the code. </li></ul>
    15. Dynamic Analysis – Overview of Techniques <ul><li>1. Tracing: Source-level interactive debugging. Watch the program execute statement-by-statement, and line-by-line. This is very useful for detailed-debugging, particularly of dense or complex instructions. Some software (for example, the Rational Developer for System z) allows you to trace the program logic, attempting to re-create the sequence of events (COBOL statements) that transpired up to and including the ABEND condition. Tracing is an invaluable method for detailed debugging. However, given the size and scope of production applications, it is generally more practical to trace specific problem areas of a program. </li></ul><ul><li>2. Interactive Execution: Execute (run) a program, stopping at selective Breakpoints (Pause execution each time a certain field-value changes, or when a value exceeds some threshold), and examining the contents (value) of specific fields. Interactive Execution must be done by (or with) an application analyst who understands how the system is supposed to operate . Interactive Execution is useful for observing control flow, and is often combined with line-by-line tracing by setting selective breakpoints, monitoring values, &quot;running&quot; the application to the breakpoints, and then tracing the code line-by-line. </li></ul><ul><li>3. Selective Data State Collection: Execute code and establish a functional summary of specific data states that it creates. Use these states in subsequent test runs to compare results of current values to expected values. </li></ul><ul><li>4. Coverage: Analyze the number of times each COBOL statement is executed for a given run. Note that PD Tools/Debug Tool can run a report that shows code coverage. This technique is extremely useful for analyzing test data coverage of a given application. And it can be used effectively for debugging if it makes apparent problems such as infinite loops (S222, S322 and B37 ABENDs), over-loading tables - (loading tables beyond the maximum OCCURS clause and overlaying storage, which cause things like: S0C1, S0C4, and S0C7 ABENDs). </li></ul>
    16. Hypothesis - Determine WHY the ABEND occurred – 1 of 3 <ul><li>Your preparation and research is probably all you need to be able to describe WHAT , WHERE and HOW the ABEND occurred </li></ul><ul><ul><li>At what point in the program the logic failed, and what sequence of COBOL statements caused the failure). </li></ul></ul><ul><li>However, before modifying any logic, you must determine WHY these statements (or sequence of events) caused this particular failure </li></ul><ul><ul><li>&quot;Why did this production input file contain spaces in a numeric field?&quot; </li></ul></ul><ul><ul><li>&quot;Why did the program's logic perform the Initialization routine twice?&quot; </li></ul></ul><ul><ul><li>&quot;Why did the Read routine execute past end-of-file?&quot; </li></ul></ul><ul><ul><li>etc. </li></ul></ul><ul><li>Only through a determination of WHY will you be able to make a change to production business logic safely, and with confidence that; </li></ul><ul><ul><li>Your change will resolve the ABEND </li></ul></ul><ul><ul><li>Your change will not introduce new (additional) ABENDs </li></ul></ul>
    17. Hypothesis - Determine WHY the ABEND occurred – 2 of 3 <ul><li>Sometimes it is relatively easy to come to an understanding of WHY certain ABEND conditions occurred. For example, perhaps a period was left off the appropriate termination point for an IF statement - which caused execution to perform an operation out of sequence. Or perhaps an IF .. NUMERIC test (which should have been coded for all numeric fields in a file) was forgotten. Or a paragraph was performed through the wrong paragraph-exit, or a production job was released before certain files were available (causing I/O errors). These types of ABEND situations can be understood (and usually resolved) fairly quickly. But, not always. </li></ul><ul><ul><li>What if - in the case of the IF statement with the incorrect termination point - the logic that has been coded, correctly processed the first 100,000 records in the file? </li></ul></ul><ul><ul><ul><li>Making a change to a critical IF condition could very well affect other down-stream processing within the program, wrecking havoc with subsequent routines. </li></ul></ul></ul><ul><ul><li>Or what if - in the case of the file containing blanks in the numeric fields - the input file was supposed to be &quot;clean&quot; (validated) by this point in the job-stream - having gone through allegedly &quot;exhaustive&quot; edits in prior modules. </li></ul></ul><ul><ul><ul><li>By simply adding an IF test you may solve your program's specific ABEND, but you will not have resolved the actual problem - which exists somewhere else in the system. </li></ul></ul></ul><ul><ul><ul><li>In other words, localized/piecemeal approaches to resolving production ABENDs are not recommended - as they usually change the problem, instead of solving it. And sometimes they just spawn new problems. </li></ul></ul></ul><ul><li>It should be noted that, a clear understanding of the business functionality automated by this process is usually required to resolve WHY something has gone wrong. </li></ul><ul><ul><li>Calling on business experts or &quot;application/business&quot; experts who understand &quot;the big picture&quot; - and the context in which the job executes is the rule rather than the exception to this process. </li></ul></ul>
    18. Hypothesis - Determine WHY the ABEND occurred – 3 of 3 <ul><li>Developing a clear and accurate determination of WHY a problem that lead to an ABEND condition exists may take a considerable amount of time, depending on the: </li></ul><ul><ul><li>Size, complexity and structure of the code </li></ul></ul><ul><ul><li>Your familiarity with the program's business purpose - coupled with your ability to grasp the point of each statement (assuming you didn't write the code) </li></ul></ul><ul><ul><li>Type of ABEND and reason for the problem (some are more diabolical than others) </li></ul></ul><ul><ul><li>Size of the input/output files, and capabilities of your file editor </li></ul></ul><ul><li>Note that, in addition to an understanding of the reason for the ABEND, the results of your investigation should produce an understanding of the solution to the problem (the fix itself). </li></ul>
    19. Solution - Fix the Problem and Test Your Solution <ul><li>Take the appropriate action to resolve any business - or system-wide issues. </li></ul><ul><li>Depending on how extensive the damage caused by the problem, or for how long any problems have persisted undetected: </li></ul><ul><ul><li>Files may have to be restored from backups from a previous point-in-time </li></ul></ul><ul><ul><li>Jobs may have to be re-run from a previous point-in-time (synchronized with file generations) </li></ul></ul><ul><ul><li>Files may have to be modified with &quot;one-shot&quot; programs, written to resolve issues that require &quot;surgery&quot; on the data </li></ul></ul><ul><li>Take the appropriate action to fix the technical (coding) problem: </li></ul><ul><ul><li>Edit program source - modifying the existing production logic …and/or… </li></ul></ul><ul><ul><li>Modify the JCL (if the error included JCL issues) </li></ul></ul><ul><ul><li>You may have to edit files using File Manager </li></ul></ul><ul><li>Test your solution: </li></ul><ul><ul><li>Compile and Link the new version of the application </li></ul></ul><ul><ul><li>Create an &quot;image copy&quot; of the production file system, in order to test your fix </li></ul></ul><ul><ul><li>Re-Run the batch job and analyze results </li></ul></ul><ul><ul><li>Run &quot;Regression Tests&quot; against the new code – analyze for unexpected results </li></ul></ul> 
    20. Resolution <ul><li>Build in the test environment </li></ul><ul><li>Migrate changes to back in to production </li></ul><ul><li>Promote your changes to production </li></ul><ul><li>Schedule and re-run the cycle </li></ul><ul><li>http://en.wikipedia.org/wiki/IBM_Rational_ClearCase </li></ul>Batch Job
    21. Unit objectives <ul><li>After having completed this unit on Production Support/Application Testing/Software Defect and IBM Mainframe COBOL ABEND Research, you should now be able to: </li></ul><ul><ul><li>Define the steps in a generalized methodology of ABEND resolution </li></ul></ul><ul><ul><li>List the various sources of ABEND inputs, including: </li></ul></ul><ul><ul><ul><li>PD Tools documents </li></ul></ul></ul><ul><ul><ul><li>Fault Analyzer reports </li></ul></ul></ul><ul><ul><ul><li>Other SYSOUT </li></ul></ul></ul><ul><ul><ul><li>Static analysis </li></ul></ul></ul><ul><ul><ul><li>Dynamic trace facilities </li></ul></ul></ul><ul><ul><li>List the common types of COBOL program ABENDS </li></ul></ul>
    22. The RDz Workbench UNIT Topics: <ul><li>Analyzing Mainframe Abends </li></ul><ul><li>ABEND Codes and Reasons </li></ul><ul><li>Using IBM's Fault Analyzer </li></ul><ul><li>Appendix </li></ul>
    23. ABEND Completion Codes and some typical causes <ul><li>While there is a wide variety of reasons for ABEND conditions (&quot; WHY s&quot;) in production systems, it is possible (and useful) to categorize and organize HOW certain conditions often lead to certain types of ABEND completion codes - in order to expedite or streamline your analysis and research (an 80/20 approach to analysis). </li></ul><ul><li>The following information on a few common z/OS ABEND completion codes, and the conditions which generated them is included for you to make effective use of PD Tools/Fault Analyzer listings and the above debugging, research and analysis process. </li></ul><ul><li>Notes: </li></ul><ul><ul><li>This information is available to some degree within the RDz product in the Lookup View </li></ul></ul><ul><ul><li>There is another source of ABEND/Debug information you might want to take a peek at: </li></ul></ul><ul><ul><ul><li>http://www.jsayles.com/ibm/cobol/ABEND.htm </li></ul></ul></ul><ul><ul><ul><li>http://it.geocities.com/aminardi/computer/CODES.html </li></ul></ul></ul>
    24. S001: Record Length/Block Size Discrepancy <ul><li>Reason(s) </li></ul><ul><li>S001-0: Conflict between record length specifications (program vs. JCL vs. dataset label) </li></ul><ul><li>S001-2: Damaged storage media or hardware error </li></ul><ul><li>S001-3: Fatal QSAM error </li></ul><ul><li>S001-4: Conflict between Block specifications (program vs. JCL) </li></ul><ul><li>S001-5: Attempt to read past end-of-file </li></ul><ul><li>Instructions: </li></ul><ul><li>OPEN, CLOSE, READ, WRITE </li></ul><ul><li>Frequent Coding Causes: </li></ul><ul><li>S001-0: Typos in FD or JCL </li></ul><ul><li>S001-2: Corrupt disk or tape dataset </li></ul><ul><li>S001-3: Internal z/OS problem </li></ul><ul><li>S001-4: Forgot to code BLOCK CONTAINS 0 RECORDS in FD (default Block is 1) </li></ul><ul><li>S001-5: Logic error (either forgot to close file, or end-of-file-switch not set, overwritten or ignored) </li></ul><ul><li>Tools to debug/RDz equivalent return codes: </li></ul><ul><li>S001-0: Cannot occur on RDz with Local ASCII/Windows (Line Sequential) files </li></ul><ul><li>S001-2: Norton Utilities – if on Workstation/COBOL application </li></ul><ul><li>S001-4: Cannot occur on Workstation/COBOL (no blocking for Line Sequential files) </li></ul><ul><li>S001-5: Logic error: Use RDz's Perform Hierarchy or RAA's Program Flow Diagram to detect </li></ul><ul><li>Dynamic: </li></ul><ul><li>S001-0: During Debug – set a Watch Monitor on the 01 record </li></ul><ul><li>S001-2: Need to have PC/IT technician investigate (may need to reformat disk) </li></ul><ul><li>S001-4: Always code BLOCK CONTAINS 0 </li></ul>
    25. S013: Conflicting DCB Parameters <ul><li>Reason(s) </li></ul><ul><li>S013-10: Dummy data set needs buffer space; specify BLKSIZE in JCL </li></ul><ul><li>S013-14: DD statement must specify a PDS </li></ul><ul><li>S013-18: PDS member not found </li></ul><ul><li>S013-1C: I/O error search PDS directory </li></ul><ul><li>S013-20: Block size is not a multiple of the LRECL </li></ul><ul><li>S013-34: LRECL is incorrect </li></ul><ul><li>S013-50: Tried to open a printer for Input of I/O </li></ul><ul><li>S013-60: Block size not equal to LRECL for unblocked file </li></ul><ul><li>S013-64: Attempted to Dummy out indexed or relative file </li></ul><ul><li>S013-68: Block size > 32K </li></ul><ul><li>S013-A4: SYSIN or SYSOUT not QSAM file </li></ul><ul><li>S013-A8: Invalid RECFM for SYSIN/SYSOUT </li></ul><ul><li>S013-D0: Attempted to define PDS with RECFM FBS or FS </li></ul><ul><li>S013-E4: Attempted to concatenate > 16 PDSs </li></ul><ul><li>Instructions: </li></ul><ul><li>OPEN, CLOSE, READ, WRITE </li></ul><ul><li>Frequent Coding Causes: </li></ul><ul><li>Most of these ABENDs occur running und z/OS (some may not even occur under z/OS, although older modules running OSVS or VS COBOL II code that have not been recompiled can produce them). Most are due JCL/COBOL  FD inconsistencies. </li></ul><ul><li>Tools to debug: </li></ul><ul><li>Static </li></ul><ul><li>S013-18 : Open multiple windows on RAA Batch Job Diagram and program Environment Division - SELECT ASSIGN. </li></ul>
    26. SOC1: Invalid Instruction <ul><li>Reason(s) </li></ul><ul><li>- SYSOUT DD statement missing </li></ul><ul><li>- The value in an AFTER ADVANCING clause is < 0 or > 99 </li></ul><ul><li>- And Index or Subscript is out of range </li></ul><ul><li>- An I/O verb was issued against an unopened dataset </li></ul><ul><li>Instructions: </li></ul><ul><li>OPEN, CLOSE, READ, WRITE , Table handling routines </li></ul><ul><ul><li>Note also that during Debug SYSOUT-DISPLAYs are written to the &quot;console&quot;, recall how to view </li></ul></ul><ul><li>Frequent Coding Causes: </li></ul><ul><li>- Incorrect logic in setting AFTER ADVANCING variable (or failure to understand 0-99 limits) </li></ul><ul><li>- Incorrect logic in table handling code, or number of table entries has outgrown PIC of variable (e.g. PIC 99, but 100 entries) </li></ul><ul><li>Tools to debug: </li></ul><ul><li>Static </li></ul><ul><li>SYSOUT problem: Open multiple windows on RAA Batch Job Diagram and program Environment Division - SELECT ASSIGN. </li></ul><ul><li>In RAA: Double-click on GO TO verb, or PERFORM chain, or paragraph name. </li></ul><ul><li>In RDz: Select Paragraph name/Perform chain and select: Open Declaration </li></ul><ul><li>Dynamic: </li></ul><ul><li>Set Watch Breakpoint and Monitor on table index or AFTER ADVANCING variable. </li></ul><ul><li>Set conditional advanced break point on subscript (i.e. SUB<100). </li></ul>
    27. S0C4: Protection Exception <ul><li>Reason(s) </li></ul><ul><li>The program is attempting to access a memory address that is not within the applications z/OS Address Space </li></ul><ul><li>Frequent Coding Causes: </li></ul><ul><li>- JCL DD statement is missing or incorrectly coded </li></ul><ul><li>- Incorrect logic in table handling code (referencing a table subscript < 1 or > max-table-size), </li></ul><ul><li>- Number of table entries has outgrown PIC of variable (i.e. PIC 99, but 100 entries). </li></ul><ul><li>- In IMS/TM systems, an MFS LL (length) field value is smaller than the actual input MSG length. </li></ul><ul><li>Tools to debug: </li></ul><ul><li>Static </li></ul><ul><li>- DD statement problem: Open multiple windows on RAA Batch Job Diagram and program Environment Division - SELECT ASSIGN </li></ul><ul><li>- IMS LL problem: Analyze through multiple Edit Windows (same solution as DD). </li></ul><ul><li>- Incorrect linkage problem: </li></ul><ul><li>- Open multiple windows on CALLing and CALLed programs - verify linkage declarations. </li></ul><ul><li>Dynamic </li></ul><ul><li>Incorrect linkage problem: </li></ul><ul><li>- Set Breakpoint and Monitor on linkage declarations. </li></ul><ul><li>- Set conditional advanced break point on subscript (i.e. IDX < 100). </li></ul><ul><li>RAA - Utilize Run-Unit View to view all modules in Debug run-stream (both active and inactive). </li></ul><ul><li>Incorrect logic </li></ul><ul><li>In RDz/Debug - set a conditional break point on subscript (i.e. IDX < 100). </li></ul>
    28. S0C7: Data Exception <ul><li>Reason: </li></ul><ul><li>Machine instruction expecting numeric data found invalid data </li></ul><ul><li>Instructions: </li></ul><ul><li>Arithmetic, IF-THEN-ELSE, MOVE (if receiving field is numeric - ) </li></ul><ul><li>Note: RDz will also S0C7 if sending field is numeric and contains non-numeric ( MOVE pic9field TO picXfield) </li></ul><ul><li>Frequent Coding Causes: </li></ul><ul><li>- Incorrectly initialized, or uninitialized variable </li></ul><ul><li>- Missing or incorrect data edit </li></ul><ul><li>- 01 to 01 level MOVE if sending field is shorter than receiving field </li></ul><ul><li>- Move of Zeros to Group-level numeric fields </li></ul><ul><li>- MOVE CORRESPONDING incorrect </li></ul><ul><li>- or - </li></ul><ul><li>- MOVE field1 to field2 incorrect assignment </li></ul><ul><li>Tools to debug: </li></ul><ul><li>Static </li></ul><ul><li>RAA report with options data selector on MOD or ALL </li></ul><ul><li>Dynamic </li></ul><ul><li>Set Watch points and Monitor on field. </li></ul><ul><li>Run through to S0C7. </li></ul><ul><li>Locate the field definition, or use CSI report. </li></ul><ul><li>Solutions: </li></ul><ul><li>Add edit checks for all numeric fields and MOVE statements. </li></ul>
    29. S0CB: Divide by zero <ul><li>Reason: </li></ul><ul><li>CPU attempted to divide a number by 0. </li></ul><ul><li>Instructions: </li></ul><ul><li>DIVIDE, COMPUTE </li></ul><ul><li>Frequent Coding Causes: </li></ul><ul><li>- Incorrectly initialized, or un-initialized variable </li></ul><ul><li>- Missing or incorrect data edits (i.e. failed to check divisor for zero value) </li></ul><ul><li>Tools to debug: </li></ul><ul><li>Static </li></ul><ul><li>RAA report on all DIVIDE and COMPUTE instructions – or using RDz double-click on these verbs and select Filter from the Context Menu </li></ul><ul><li>Dynamic </li></ul><ul><li>Run through to the S0CB </li></ul><ul><li>Locate to field definitions of the offending fields </li></ul><ul><li>Solution: </li></ul><ul><li>Add edit to check for zero divide: </li></ul><ul><li>IF divisor > ZERO </li></ul><ul><li>THEN </li></ul><ul><li>COMPUTE ... </li></ul><ul><li>ELSE </li></ul><ul><li>PERFORM error-processing routine </li></ul><ul><li>Add ON SIZE ERROR to all arithmetic verbs. </li></ul>
    30. S222/S322: Timeout/Endless loop <ul><li>Reason: </li></ul><ul><li>Timeout due to program logic caught in &quot;loop&quot; through instruction set with no exit. </li></ul><ul><li>Note: RDz Workstation binaries (Run-Time System) does not honor the concept of timeout. </li></ul><ul><li>Frequent Coding Causes: </li></ul><ul><li>- Invalid logic or fall-through logic </li></ul><ul><li>- Invalid end-of-file logic </li></ul><ul><li>- End-of-file switch overlaid </li></ul><ul><li>- Subscript not large enough </li></ul><ul><li>- Perform Thru wrong Exit </li></ul><ul><li>- PERFORM UNTIL &quot;End-Of-File&quot;, but not performing &quot;READ&quot; routine to reach EOF condition </li></ul><ul><li>Tools to debug: </li></ul><ul><li>Static </li></ul><ul><li>RAA screens on logic in PERFORM chain </li></ul><ul><li>RAA Display Perform Thru </li></ul><ul><li>Dynamic </li></ul><ul><li>PD Tools (mainframe) Debug to S222 </li></ul><ul><li>Analyze counts (color) </li></ul><ul><li>Query and Monitor on subscript </li></ul><ul><li>Set an Advanced Break Point - Conditional on count </li></ul><ul><li>Solution: </li></ul><ul><li>From within Debug, use RAAi to identify logic which could cause looping. </li></ul><ul><li>Select and click on PERFORM THRU, PERFORM UNTIL, GO TO. </li></ul><ul><li>Place break points on potential error lines. </li></ul>
    31. S806: Module Not Found <ul><li>Reason: </li></ul><ul><li>CALL made to program which could not be located along normal search path </li></ul><ul><li>(STEPLIB top-to-bottom, JOBLIB top-to-bottom, LINKPACK) </li></ul><ul><li>Instructions: </li></ul><ul><li>CALL, or JCL EXEC PGM=XXXX </li></ul><ul><li>Frequent Coding Causes: </li></ul><ul><li>- Module deleted from library, or never compiled to library </li></ul><ul><li>- Module name spelled incorrectly </li></ul><ul><li>- STEPLIB does not contain load library with module </li></ul><ul><li>- I/O error occurred while z/OS searched the directory of the library </li></ul><ul><li>Tools to debug: </li></ul><ul><li>Static </li></ul><ul><li>Do RSE search on module name. </li></ul><ul><li>Dynamic </li></ul><ul><li>Set Program Advanced Break Point (Entry) to set program break before entry to system. </li></ul><ul><li>Solution: </li></ul><ul><li>Spell name correctly  </li></ul>
    32. B37/D37/E37 – dataset space exceeded <ul><li>ABENDS - B37/D37/E37 (RTS-028) </li></ul><ul><li>B37: Disk volume out of space. </li></ul><ul><li>D37: Primary space exceeded, no secondary extents defined. </li></ul><ul><li>E37: Primary and secondary extents full. In TSO, PDS directory needs compress. </li></ul><ul><li>E37-04: Disk volume table of contents (VTOC) is full. </li></ul><ul><li>Reason: </li></ul><ul><li>MVS could not find space for output WRITE. </li></ul><ul><li>Note: RDz Local COBOL Run-Time System does not honor the concept of Primary/Secondary space &quot;Out of space&quot; condition will not occur until disk actually fills up </li></ul><ul><li>Instructions: </li></ul><ul><li>WRITE </li></ul><ul><li>Frequent Coding Causes: </li></ul><ul><li>- Not enough space initially allocated to output file(s). </li></ul><ul><li>- (more likely) Logic error - program in (infinite) loop writing output file(s) - see S222/S322 reasons. </li></ul><ul><li>Tools to debug: </li></ul><ul><li>Static - if (unlikely as this may be) you're debugging locally (on your Workstation) you can find the out-of-space file and statistics on it as follows:. </li></ul><ul><li>Do directory list on the file you are writing to: </li></ul><ul><li>Go to DOS Window </li></ul><ul><li>Type &quot;DIR fname.ext&quot; </li></ul><ul><li>On the host the JCL will show the DDNAME and z/OS filespec of the dataset in question </li></ul><ul><li>Dynamic </li></ul><ul><li>Set an advanced conditional break point to break on a certain number on iterations </li></ul><ul><li>See S222/S322 reasons and solutions </li></ul><ul><li>Also, set break point on file WRITE statements </li></ul><ul><li>Note: If not logic error and actually have full disk, you may have to clean up your disk and erase files: </li></ul>
    33. Database Abends <ul><li>DB2 application access rarely abends, they &quot;die gracefully&quot; due to return code processing. </li></ul><ul><li>DB2: </li></ul><ul><li>SQLCODE </li></ul><ul><ul><li>A unique integer which describes DB2's reaction to your request. </li></ul></ul><ul><li>SQLCA </li></ul><ul><ul><li>A large 01 block, which contains several other fields pertinent to debugging, particularly the SQLWARNs. </li></ul></ul><ul><li>Suggestion: </li></ul><ul><li>Set Line Breakpoint and/or Variable Monitor on SQLCODE and other key feedback areas </li></ul><ul><li>- or - </li></ul><ul><li>Set Line Breakpoint and Watch Monitor for /&quot;On-Change Break&quot; </li></ul><ul><li>Double-click on field, Ctrl/F3 </li></ul><ul><li>Notes on UDB Offloading and Database Abends </li></ul><ul><li>UDB handles SQLCODE processing in a manner consistent with DB2. However, it should be noted that UDB does not handle SQLWARNO-n and the SQLCA (SQLERRD, etc.) fields compatibly. </li></ul><ul><li>DB2 ABENDs </li></ul><ul><ul><li>If DB2 tables have not been defined, you may get a -204 return code on your SQL statement. </li></ul></ul><ul><ul><li>UDB may allow you to fix Database errors dynamically, without completely stopping your animator session: </li></ul></ul>
    34. The RDz Workbench UNIT Topics: <ul><li>Analyzing Mainframe Abends </li></ul><ul><li>ABEND Codes and Reasons </li></ul><ul><li>Using IBM's Fault Analyzer </li></ul><ul><li>Appendix </li></ul>
    35. Topic Considerations  Note: In this topic you will learn how to use Fault Analyzer to debug an ABEND. 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 &quot;how to&quot; – 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.
    36. Unit objectives <ul><li>After completing this unit, you should be able to: </li></ul><ul><ul><li>Work with ABEND analysis reports created by IBM Fault Analyzer </li></ul></ul><ul><ul><li>Browse Report and Mini-Dump pages </li></ul></ul><ul><ul><li>Retrieve various Fault Analyzer view information </li></ul></ul><ul><ul><li>Browse and search ABEND codes </li></ul></ul><ul><ul><li>Use the various productivity features in the Fault Analyzer perspective </li></ul></ul><ul><li>Note: </li></ul><ul><ul><li>This presentation and Lab is not a comprehensive IBM Fault Analyzer unit. It is only intended to introduce you to the RDz/Fault Analyzer interface. It is assumed that you are already working with IBM Fault Analyzer on the z/OS host. </li></ul></ul>
    37. Overview and Incentive! <ul><li>Face facts: </li></ul><ul><ul><li>ABEND research (&quot;shooting a dumps&quot;) is not how you want to spend your week-nights </li></ul></ul><ul><li>The good news? You don't have to. </li></ul><ul><li>Fault Analyzer: </li></ul><ul><ul><li>Identifies the line where execution halted </li></ul></ul><ul><ul><li>Shows the points-of-interest surrounding the ABEND: </li></ul></ul><ul><ul><ul><li>Variables and variable values </li></ul></ul></ul><ul><ul><ul><li>Statements </li></ul></ul></ul><ul><ul><ul><li>Data and buffers </li></ul></ul></ul><ul><ul><li>Gives you a serious head start on the What/Where and How of ABEND debugging </li></ul></ul>
    38. What is Fault Analyzer? <ul><li>IBM Fault Analyzer is a tool that helps you determine the cause of an application ABEND. It is used to determine: </li></ul><ul><ul><li>What happened, how it happened, what program , what line/statement , which variables , what files , were involved, etc. </li></ul></ul><ul><li>Fault Analyzer provides the necessary information to perform root cause analysis on an application ABEND. </li></ul><ul><ul><li>You do not have to interpret low-level, system dumps and wade through HEX data. Information is presented in report format </li></ul></ul><ul><li>IBM Fault Analyzer for z/OS® gathers information about an application and the surrounding environment at the time of an abnormal end (ABEND), providing you with the valuable information you need to work through </li></ul><ul><li>After analyzing information about your application and its environment, Fault Analyzer generates an analysis report ( IDIREPORT ) that describes the problem in terms of application/program statements and variables </li></ul>
    39. Fault Analyzer for z/OS Overview <ul><li>Fault Analyzer is part of IBM’s Problem Determination Tool family of products: http://www-01.ibm.com/software/awdtools/deployment/ </li></ul><ul><li>It runs in both test and production with very little overhead, and: </li></ul><ul><ul><li>Provides support for analyzing***: </li></ul></ul><ul><ul><ul><li>IMS and CICS® online application and system failures - with debugging facilities for all of the IBM-mainstream online files and databases </li></ul></ul></ul><ul><ul><ul><ul><li>IMS-DL/I, DB2, VSAM, IDMS , etc. </li></ul></ul></ul></ul><ul><ul><ul><li>WebSphere® Application Server for z/OS system failures </li></ul></ul></ul><ul><ul><ul><li>WebSphere MQ application failures </li></ul></ul></ul><ul><ul><ul><li>Batch (QSAM/VSAM/DB2®) application failures </li></ul></ul></ul><ul><ul><li>Helps you analyze failures when they occur or reanalyze them after the fact </li></ul></ul><ul><ul><li>Expands error messages and codes that apply to your failure with interactive reanalysis and includes a feature for using application-specific messages and codes to supplement those supplied by IBM </li></ul></ul><ul><ul><li>Creates a fault history file with an interactive display that helps you track and manage application failures </li></ul></ul><ul><ul><li>Starts automatically when an application fails, eliminating the need to recompile programs or change the job control language (JCL) </li></ul></ul><ul><ul><li>Integrates with Rational Developer for System z enables developers to diagnose application problems without changing user interface </li></ul></ul><ul><li>For Fault Analyzer product information, see: http://www-01.ibm.com/software/awdtools/faultanalyzer/ </li></ul>***See Notes
    40. Fault Analyzer – Operational Process <ul><li>The purpose of Fault Analyzer (FA) is to determine the cause of any ABENDs in an application program. </li></ul><ul><li>You do not have to read through application or system dumps, because the product has the ability to isolate the exact instruction that caused a particular error. </li></ul><ul><ul><li>The Analysis engine provides automatic analysis when the application fails. </li></ul></ul><ul><ul><li>When an ABEND occurs, Fault Analyzer activates automatically, and then records details in a fault history file (see screen capture below) </li></ul></ul><ul><ul><li>Fault History files contain information about the faults analyzed by Fault Analyzer for z/OS. </li></ul></ul><ul><ul><li>Using Fault History files, re-analysis is available when real-time ABEND analysis isn’t enough (you can extract additional information in batch or interactive mode) </li></ul></ul>ABEND happens Fault Analyzer exits are invoked  Salient details (points of interest) written and stored 
    41. Fault Analyzer – Batch Job Outputs Fault Analyzer Is automatically invoked if your program ABENDs An IDIREPORT is produced that provides ABEND analysis information
    42. Reviewing ABENDs in the Fault Analyzer Perspective <ul><li>Besides the IDIREPORT, you may also wish to use RDz's Fault Analyzer perspective, to analyze and debug an ABEND situation. </li></ul><ul><li>To do that you'll need to: </li></ul><ul><ul><li>Switch to the Fault Analyzer perspective in RDz </li></ul></ul><ul><ul><li>Specify the history file to connect with, that populates a Default ABEND view with failed online and batch job IDIREPORTs and other outputs </li></ul></ul><ul><ul><li>Learn how to navigate the Fault Analyzer perspective, to make use of the information contained therein </li></ul></ul><ul><li>The next slides contain the step details </li></ul>
    43. Fault Analyzer Perspective – 1 of 2 <ul><li>Steps: </li></ul><ul><ul><li>Open the Fault Analyzer Perspective </li></ul></ul>
    44. Fault Analyzer Perspective – 2 of 2 <ul><li>2. Enter: FAULTANL.<version>.HIST </li></ul><ul><ul><li>Ex. FAULTANL.V10R1.HIST </li></ul></ul>
    45. Fault Analyzer Perspective – Overview Fault Analyzer Explorer Content Area shows Fault Analyzer IDIREPORT – detailed information on ABEND IDIREPORT Available in Outline view Can navigate using the Outline view Additional Fault Analyzer views exist for other ABEND documentation including history data
    46. Fault Analyzer – Default List of History Files <ul><li>From the Default tab </li></ul><ul><ul><li>Scroll up and down – to find a particular ABEND </li></ul></ul><ul><ul><li>Double-click an ABEND history file, to bring up its IDIREPORT and other stats </li></ul></ul><ul><ul><li>Sort the list by any of the column headings </li></ul></ul><ul><li>Can also work with options of the Context Menu – with each ABEND entry </li></ul>
    47. Fault Analyzer – Browse Report – S0CB <ul><li>The IDIREPORT presents a formatted, high-level summary of the points of interest necessary to debug ABEND conditions in your application. </li></ul><ul><li>Specifically, to answer the questions: </li></ul><ul><li>What happened? </li></ul><ul><ul><li>What z/OS ABEND condition </li></ul></ul><ul><li>Where did it happen? </li></ul><ul><ul><li>what line or statement was executing when it happened </li></ul></ul><ul><li>How did it happen? </li></ul><ul><ul><li>What additional information is available for debugging purposes </li></ul></ul>Program line where the S0CB occurred   Click S0CB for an explanation of this ABEND
    48. Fault Analyzer – Browse Report – S0C4 Here's an example of an IDIREPORT which shows that RPT-REC is &quot;not addressable&quot; … which is a euphemism for: &quot;There's something really wrong with the file/FD/JCL DD connection&quot;
    49. Fault Analyzer – Browse Report – S0C7 <ul><li>The IDIREPORT and supporting text varies from ABEND to ABEND depending on: </li></ul><ul><ul><li>Type of ABEND </li></ul></ul><ul><ul><li>Information available at the time of the ABEND </li></ul></ul><ul><ul><li>Run-time platform </li></ul></ul><ul><li>Note: </li></ul><ul><li>CUST-ACCT-BALANCE's value is shown in hex (as it represents invalid data) </li></ul>
    50. Fault Analyzer – Browse Report – S0C9 A S0C9 is like a S0CB (divide by zero) except that a S0C9 occurs because of an excessively large fixed-point number obtained as the result of a decimal division operation
    51. Fault Analyzer – Browse Report – S0C1 Here is information on an IMS (DL/I) S0C1 ABEND
    52. Fault Analyzer – Browse Report – S806 IDIDREPORT information on a module-not-found (S806) ABEND Most likely SAM2 is either a typo, or the program did not successfully compile/link into the Load Module
    53. Fault Analyzer – Lookup View for MVS and File Return Codes  <ul><li>The Lookup view shows a great deal of background information on: </li></ul><ul><li>ABEND codes </li></ul><ul><li>DB2 SQLCODE </li></ul><ul><li>IMS PCB Feedback </li></ul><ul><li>VSAM File Status </li></ul><ul><li>etc. </li></ul><ul><li>You can use the view, or double-click on the ABEND code shown in the IDIREPORT </li></ul>
    54. Fault Analyzer Integration – Mini-Dump Reading 1 of 2 Fault Analyzer also provides for the reading/browsing of System Dump data – in Hex/Character format. Select an ABEND Scroll through the dump – Issue navigation commands: Show nnn, +nn, etc.
    55. Fault Analyzer Integration – Mini-Dump Reading 2 of 2 You can assign analysis notes to the dump. 1. Right-click over the storage address 2. Add your note (click OK)  3. Your note becomes highlighted text inside the dump
    56. Fault Analyzer – Organize ABEND History Views 1 2 3 Define views which contain a set of history files. Display fault entries from all history files as if they were in one dataset.
    57. Fault Analyzer – Fault History View <ul><li>The Default view shows either: </li></ul><ul><ul><li>A History File </li></ul></ul><ul><ul><li>A view of a History file </li></ul></ul>
    58. Fault Analyzer – The TSO/ISPF Interface Available Line Commands A list of History ABENDs Batch and/or Online may be in the same list
    59. Checkpoint <ul><li>What RDz Perspective is used to view Fault Analyzer reports? </li></ul><ul><li>How does RDz obtain Fault Analyzer Information? Where does the information originate? </li></ul><ul><li>RDz Fault Analyzer interface has a Lookup View . What is it used for? </li></ul><ul><li>How can you jump to the program statement where the ABEND occurred with the RDz Fault Analyzer interface? </li></ul>
    60. Summary <ul><li>Having completed this unit, you should now be able to: </li></ul><ul><ul><li>Work with ABEND analysis reports created by IBM Fault Analyzer </li></ul></ul><ul><ul><li>Browse Report and Mini-Dump pages </li></ul></ul><ul><ul><li>Retrieve various Fault Analyzer view information </li></ul></ul><ul><ul><li>Browse and search ABEND codes </li></ul></ul><ul><ul><li>Use the various productivity features in the Fault Analyzer perspective </li></ul></ul>
    61. Workshop (for Sandbox Users) – Big Picture <ul><li>In this workshop you are going to: </li></ul><ul><li>Copy a several datasets from your instructor's zServerOS TSO ID to your ID </li></ul><ul><ul><ul><li>Details on the next slide </li></ul></ul></ul><ul><li>Modify JCL dataset names (and high-level qualifiers) to match your Sandbox ID </li></ul><ul><li>Compile a program named: HOSPCALC – which contains different types of COBOL ABENDs generated from invalid COBOL logic in different parts of the program </li></ul><ul><li>Run HOSPCALC (it will ABEND) – and from the Fault Analyzer IDIREPORT : </li></ul><ul><ul><ul><li>Find the error in the COBOL source, and use the IDIREPORT ABEND analysis data to fix the error </li></ul></ul></ul><ul><ul><ul><li>After you've solved the problem, you will save your edits, and re-compile HOSPCALC. Then run the program until you either get the next ABEND  … or get a zero return code  </li></ul></ul></ul>HOSPCALC Load Module Analyze IDIREPORT  Fix HOSPCALC COBOL error Compile Link Edit
    62. Workshop – Setup Steps – 1 of 2 <ul><li>If you are working on the Sandbox, do the following: </li></ul><ul><li>In Remote Systems, create a new MVS Filter named: RDZFA for: DDS0001.POT.* </li></ul><ul><li>Expand the RDZA filter, and: </li></ul><ul><ul><li>Copy DDS0001.POT.COBOL member: HOSPCALC to < EM4Zxx > .POT.COBOL PDS </li></ul></ul><ul><ul><li>Copy DDS0001.POT.JCL member: HOSPCALC to < EM4Zxx > .POT.JCL PDS </li></ul></ul><ul><ul><ul><li>This is the compile JCL for HOSPCALC </li></ul></ul></ul><ul><ul><li>Copy DDS0001.POT.JCL member: HOSPCRUN to < EM4Zxx > .POT.JCL PDS </li></ul></ul><ul><ul><ul><li>This is the run JCL, for HOSPCALC </li></ul></ul></ul><ul><li>Right-click over DDS0001.POT.DATA and use Allocate Like to create a new PDS named: < yourEM4Zxx > .POT.DATA - with the same dataset characteristics </li></ul>Example with ID: EM4Z07
    63. Workshop – Steps – 2 of 2 <ul><li>4. Expand the EM4zxx.POT.JCL library : </li></ul><ul><ul><li>Edit HOSPCALC. </li></ul></ul><ul><ul><ul><li>Replace all occurrences of: DDS0001 with < yourEM4Zxx > </li></ul></ul></ul><ul><ul><ul><li>Save your edits </li></ul></ul></ul><ul><ul><li>Edit HOSPCRUN. </li></ul></ul><ul><ul><ul><li>Replace all occurrences of: DDS0001.POT with < yourEM4Zxx > .POT </li></ul></ul></ul><ul><ul><ul><li>Save your edits </li></ul></ul></ul><ul><li>5. Submit your modified HOSPCALC JCL. When the job finishes, check the results in your JES My Jobs filter (it should compile successfully – but check that the LKED step ran) </li></ul><ul><li>6. Submit your modified HOSPCRUN JCL. The job should ABEND. In JES - My Jobs , view the IDIREPRT step, to see the specific system completion code and surrounding Fault Analyzer ABEND analysis information </li></ul><ul><ul><li>Note that HOSPCALC contains four separate ABEND errors – that you will hit, one at a time: an 0C7, an 0CB, an 0C4 and a combined 0C7/0C4 ABEND (Sounds strange ... Essentially Fault Analyzer will find two different problems on one statement) </li></ul></ul><ul><ul><li>The comments and descriptions in the IDIREPRT combined with your COBOL knowledge should be sufficient to debug and fix these problems, but feel free to elicit help from your instructor if you're stuck. </li></ul></ul><ul><li>7. Fix the COBOL error that caused the ABEND. Then repeat steps 5 and 6 until you find and fix all of the ABENDs in HOSPCALC. You're done when HOSPCRUN finishes with a zero return code. </li></ul>

    ×