1 Copyright 2007, Information Builders. Slide 1 Nat Poe WebFOCUS Debugging Techniques.

Slides:



Advertisements
Similar presentations
Debugging ACL Scripts.
Advertisements

Copyright 2007, Information Builders. Slide 1 Relational Efficiencies: Part II Overview and JOIN / Sort Scenarios Renee Teatro Information Builders.
Copyright 2007, Information Builders. Slide 1 Accumulation Techniques for Reporting with WebFOCUS Kyle Hachey Systems Engineer.
Concepts of Database Management Sixth Edition
Access - Project 1 l What Is a Database? –A Collection of Data –Organized in a manner to allow: »Access »Retrieval »Use of That Data.
Instructor: Craig Duckett CASE, ORDER BY, GROUP BY, HAVING, Subqueries
Chapter 4B: More Advanced PL/SQL Programming
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
Finding and Debugging Errors
Computer Science 1620 Programming & Problem Solving.
Introduction to PL/SQL
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Chapter 2 Querying a Database
Concepts of Database Management Sixth Edition
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Microsoft Access 2010 Chapter 7 Using SQL.
Access Tutorial 3 Maintaining and Querying a Database
State of Connecticut Core-CT Project Query 4 hrs Updated 1/21/2011.
MS Access: Database Concepts Instructor: Vicki Weidler.
Database Programming Sections 5– GROUP BY, HAVING clauses, Rollup & Cube Operations, Grouping Set, Set Operations 11/2/10.
Informer Web Reporting Basic Reporting
ASP.NET Programming with C# and SQL Server First Edition
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
October 2003Bent Thomsen - FIT 3-21 IT – som værktøj Bent Thomsen Institut for Datalogi Aalborg Universitet.
General Programming Introduction to Computing Science and Programming I.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
1 Data List Spreadsheets or simple databases - a different use of Spreadsheets Bent Thomsen.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 4 BACKNEXTEND 4-1 LINKS TO OBJECTIVES Query Design Query Criteria Modify a Query Using OR.
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Access 2003 Lab 3 Analyzing Data and Creating Reports.
Analyzing Data For Effective Decision Making Chapter 3.
Management Information Systems MS Access MS Access is an application software that facilitates us to create Database Management Systems (DBMS)
Concepts of Database Management Seventh Edition
Concepts of Database Management Seventh Edition
Indexed and Relative File Processing
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Guide to Oracle 10g ITBIS373 Database Development Lecture 4a - Chapter 4: Using SQL Queries to Insert, Update, Delete, and View Data.
Concepts of Database Management Eighth Edition Chapter 3 The Relational Model 2: SQL.
Database Applications – Microsoft Access Lesson 4 Working with Queries 36 Slides in Presentation.
Introducing Python CS 4320, SPRING Lexical Structure Two aspects of Python syntax may be challenging to Java programmers Indenting ◦Indenting is.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 25.1 Test-Driving the ATM Application 25.2.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Working with Data Lists.
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Aliya Farheen October 29,2015.
Access Queries Agenda 6/16/14 Review Access Project Part 1, answer questions Discuss queries: Turning data stored in a database into information for decision.
0 / Database Management. 1 / Identify file maintenance techniques Discuss the terms character, field, record, and table Describe characteristics.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
NSF DUE ; Wen M. Andrews J. Sargeant Reynolds Community College Richmond, Virginia.
STAGES Language Application Overview. The Language Application is available on a separate URL (typically /stagesLanguage) and tied to only one database.
Chapter 12© copyright Janson Industries Java Server Faces ▮ Explain the JSF framework ▮ SDO (service data objects) ▮ Facelets ▮ Pagecode classes.
Agenda for Class - 03/04/2014 Answer questions about HW#5 and HW#6 Review query syntax. Discuss group functions and summary output with the GROUP BY statement.
IMS 4212: Constraints & Triggers 1 Dr. Lawrence West, Management Dept., University of Central Florida Stored Procedures in SQL Server.
Unit-6 Handling Sessions and Cookies. Concept of Session Session values are store in server side not in user’s machine. A session is available as long.
CS Class 04 Topics  Selection statement – IF  Expressions  More practice writing simple C++ programs Announcements  Read pages for next.
An Introduction to Programming with C++ Sixth Edition Chapter 5 The Selection Structure.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
 CONACT UC:  Magnific training   
In this session, you will learn to: Create and manage views Implement a full-text search Implement batches Objectives.
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
Concepts of Database Management, Fifth Edition Chapter 3: The Relational Model 2: SQL.
ASP.NET Programming with C# and SQL Server First Edition
SQL and SQL*Plus Interaction
The Selection Structure
Designing and Debugging Batch and Interactive COBOL Programs
Topics Introduction to File Input and Output
Exploring Microsoft® Access® 2016 Series Editor Mary Anne Poatsy
Iteration: Beyond the Basic PERFORM
Topics Introduction to File Input and Output
CHAPTER 6 Testing and Debugging.
Presentation transcript:

1 Copyright 2007, Information Builders. Slide 1 Nat Poe WebFOCUS Debugging Techniques

Copyright 2007, Information Builders. Slide 2  The strangest errors can have the simplest solutions.  Finding bugs is an acquired skill based on experience. Introduction “Anything that can go wrong will go wrong.” -Murphy’s Law “Anything that can go wrong will go wrong.” -Murphy’s Law

Copyright 2007, Information Builders. Slide 3  Incorrect Output  No Report  Relational Database Considerations  Other Considerations Contents

4 Copyright 2007, Information Builders. Slide 4 Incorrect Output

Copyright 2007, Information Builders. Slide 5 Defined Field Problem Issue 1: A defined field doesn’t seem to calculate the correct value. Only Non-Sales department employees are to receive a 1% bonus. Except for Sales the bonus is 1% In Sales, there should be no bonus

Copyright 2007, Information Builders. Slide 6 Defined Field Problem (continued) Remove sorting for detail report Bonus is the same from the record above the SALES records Issue 1: A defined field doesn’t seem to calculate the correct value. Only Non-Sales department employees are to receive a 1% bonus.

Copyright 2007, Information Builders. Slide 7 Defined Field Problem Solution Issue 1: A defined field doesn’t seem to calculate the correct value. Only Non-Sales department employees are to receive a 1% bonus. Solution: Define needs an ELSE condition. In Sales, bonus is now correct Always code an ELSE condition in an IF statement

Copyright 2007, Information Builders. Slide 8 Aggregation Problem Issue 2: Adding a new field to the report changes the results. Aggregating Salary by Division Salary is different

Copyright 2007, Information Builders. Slide 9 Aggregation Problem (continued) Target a group and run detail reports Some employees are missing Issue 2: Adding a new field to the report changes the results.

Copyright 2007, Information Builders. Slide 10 Aggregation Problem (continued) First report used data from EMPINFO Second report used data from TRNHIST Issue 2: Adding a new field to the report changes the results.

Copyright 2007, Information Builders. Slide 11 Aggregation Problem (continued) Unspecified defers to the “ALL” setting Issue 2: Adding a new field to the report changes the results.

Copyright 2007, Information Builders. Slide 12 Aggregation Problem (continued) To check the ALL setting Issue 2: Adding a new field to the report changes the results.

Copyright 2007, Information Builders. Slide 13 Aggregation Problem (continued) Salaries of employees not taking training were excluded Issue 2: Adding a new field to the report changes the results.

Copyright 2007, Information Builders. Slide 14 Aggregation Problem Solution Issue 2: Adding a new field to the report changes the results. Solution: Either set ALL to ON or declare a left outer JOIN. Note: Inner and Left Outer JOINs override the ALL setting

Copyright 2007, Information Builders. Slide 15 MATCH FILE Problem Issue 3: Data is appearing with blank values when there should be values. The procedure is using MATCH FILE. Blank departments and names start the report

Copyright 2007, Information Builders. Slide 16 MATCH FILE Problem (continued) Extracting all WE employees and the matching courses Issue 3: Data is appearing with blank values when there should be values. The procedure is using MATCH FILE.

Copyright 2007, Information Builders. Slide 17 MATCH FILE Problem (continued) Department and name listed for first course only Create a report on CRSHOLD with no sort fields. Issue 3: Data is appearing with blank values when there should be values. The procedure is using MATCH FILE.

Copyright 2007, Information Builders. Slide 18 MATCH FILE Problem (continued) Old fileNew file Note: When using PRINT for the old file and new file, MATCH assumes there are duplicate PIN values in the old and new files, so it will match the first employee 30 in the old file to the first employee 30 in the new file. It needs a second old file employee 30 to match it to the second new file employee 30 and so forth. Issue 3: Data is appearing with blank values when there should be values. The procedure is using MATCH FILE.

Copyright 2007, Information Builders. Slide 19 Issue 3: Data is appearing with blank values when there should be values. The procedure is using MATCH FILE. Solution: MATCH FILE Problem Solution SUM EMPINFO fields instead MATCH now replicates the data Use SUM for the old file.

Copyright 2007, Information Builders. Slide 20 MATCH FILE Problem Solution (continued) Report is now correct Issue 3: Data is appearing with blank values when there should be values. The procedure is using MATCH FILE. Solution: Use SUM for the old file.

Copyright 2007, Information Builders. Slide 21 Incorrect average Sort Group Calculation Problem Correct average Issue 4: Calculation for a subfoot is incorrect for some of the groups. The report is using a RECAP with invisible fields.

Copyright 2007, Information Builders. Slide 22 NOPRINT fields Sort Group Calculation Problem (continued) RECAP uses the sum of values for a sort group Issue 4: Calculation for a subfoot is incorrect for some of the groups. The report is using a RECAP with invisible fields.

Copyright 2007, Information Builders. Slide 23 Sort Group Calculation Problem (continued) Note: LET translates a word or phrase into another word or phrase. Use LET to “deactivate” the NOPRINT Issue 4: Calculation for a subfoot is incorrect for some of the groups. The report is using a RECAP with invisible fields.

Copyright 2007, Information Builders. Slide 24 Sort Group Calculation Problem (continued) RECAP for CA is: 10, / 10 NOPRINT fields will now display Issue 4: Calculation for a subfoot is incorrect for some of the groups. The report is using a RECAP with invisible fields.

Copyright 2007, Information Builders. Slide 25 Issue 4: Calculation for a subfoot is incorrect for some of the groups. The report is using a RECAP with invisible fields. Solution: Sort Group Calculation Problem Solution RECAP for CA is: 10, / 4 CNTR should be set to 1 for each course. Note: Delete LET when finished debugging!

Copyright 2007, Information Builders. Slide 26 Sort Group Calculation Problem Solution (continued) Correct average Issue 4: Calculation for a subfoot is incorrect for some of the groups. The report is using a RECAP with invisible fields. Solution: CNTR should be set to 1 for each course.

Copyright 2007, Information Builders. Slide 27 Incorrect Ratio Problem Should be between 1.8% and 2.6% Issue 5: Wrong ratio displayed at the end of the report.

Copyright 2007, Information Builders. Slide 28 Incorrect Ratio Problem (continued) Percentages were summed Issue 5: Wrong ratio displayed at the end of the report.

Copyright 2007, Information Builders. Slide 29 Issue 5: Wrong ratio displayed at the end of the report. Solution: Incorrect Ratio Problem Solution Recalculated the Compute Use Summarize instead of Column totals.

Copyright 2007, Information Builders. Slide 30 Where is the other 2%? Incorrect Column Total Problem Issue 6: Percentages don’t add up to 100%.

Copyright 2007, Information Builders. Slide 31 Incorrect Column Total Problem (continued) Format changed to D6.1% for PCT of STAFF_CNTR Integer field Issue 6: Percentages don’t add up to 100%.

Copyright 2007, Information Builders. Slide 32 Incorrect Total Problem (continued) Note: The percent of total was calculated as an integer value, which truncates the decimal portion of a number. The result is then changed to the decimal format. Issue 6: Percentages don’t add up to 100%.

Copyright 2007, Information Builders. Slide 33 Issue 6: Percentages don’t add up to 100%. Solution: Incorrect Total Problem Fixed Counter changed to a floating decimal format Change the format of the counter to a decimal number.

Copyright 2007, Information Builders. Slide 34  Isolate the Problem  When aggregating data, look at some or all of the detail.  Display data without sort fields.  Check the temporary field expression syntax.  Display NOPRINT fields.  A different numeric format could change the results.  Common Remedies  With IF…THEN…, always code an ELSE too.  To control the handling of short path records, use:  The SET ALL command for an Unspecified JOIN.  Declare Inner or Left Outer in the JOIN component.  In MATCH FILE use SUM for the Old file to replicate data in the New file.  Use Summarize for column totals and Recompute for subtotals to recalculate computed values in summary lines.  Don’t use Integer fields when decimal results are needed in calculations. Incorrect Output Review

Copyright 2007, Information Builders. Slide 35  Helpful Debugging Commands Incorrect Output Review (continued) To display a setting: ? SET setting Note: Use ALL. to display the ALL setting. To “disable” NOPRINT: LET NOPRINT =

36 Copyright 2007, Information Builders. Slide 36 No Report

Copyright 2007, Information Builders. Slide 37 Multi-path Problem Issue 7: Path error message occurs when running a report. Error number Note: Report is sorted by SITE, FULLNAME, and COURSESTART.

Copyright 2007, Information Builders. Slide 38 Multi-path Problem (continued) Issue 7: Path error message occurs when running a report. Query the error Detailed message Add an Other component

Copyright 2007, Information Builders. Slide 39 Multi-path Problem (continued) Issue 7: Path error message occurs when running a report. Note: With the double arrowheads (-- >> ), the Reporting Server assumes multiple sites exist for each employee with an independent number of course start dates for each employee. Delete the Other component

Copyright 2007, Information Builders. Slide 40 Multi-path Problem Solution Issue 7: Path error message occurs when running a report. Solution: Changed to a single path Since Site is unique, specify a single path.

Copyright 2007, Information Builders. Slide 41 No Data Selected No selection statements Issue 8: No data appears in a report when a selection statement is added. Some states exceed 5,000

Copyright 2007, Information Builders. Slide 42 No Data Selected (continued) Issue 8: No data appears in a report when a selection statement is added. Selection statement added

Copyright 2007, Information Builders. Slide 43 No Data Selected Solution Issue 8: No data appears in a report when a selection statement is added. Solution: Screen for aggregated values.

Copyright 2007, Information Builders. Slide 44 Column Notation Problem No data when the Avg Salary formats were changed Issue 9: Changing a field format loses all data for a report.

Copyright 2007, Information Builders. Slide 45 Column Notation Problem (continued) Column notation to avoid duplicate field names Issue 9: Changing a field format loses all data for a report. Note: Report is OK. Multi-set request

Copyright 2007, Information Builders. Slide 46 Column Notation Problem (continued) Both average salary formats were changed to whole numbers Issue 9: Changing a field format loses all data for a report.

Copyright 2007, Information Builders. Slide 47 Column Notation Problem (continued) C3 – Original Format C4 – New Format There are now two columns: C1 – Original Format C2 – New Format Issue 9: Changing a field format loses all data for a report.

Copyright 2007, Information Builders. Slide 48 Column Notation Problem Solution Unique names for selection Issue 9: Changing a field format loses all data for a report. Solution: Define fields with the desired format and use them instead.

Copyright 2007, Information Builders. Slide 49 Column Notation Problem Solution (continued) Issue 9: Changing a field format loses all data for a report. Solution: Define fields with the desired format and use them instead.

Copyright 2007, Information Builders. Slide 50 Including a Non-MR Procedure WebFOCUS Client can’t find the procedure Web Server WebFOCUS Client (Managed Reporting) WebFOCUS Client (Managed Reporting) Issue 10: A Standard Report in Managed Reporting is trying to include a procedure on the Report Server.

Copyright 2007, Information Builders. Slide 51 Web Server WebFOCUS Client (Managed Reporting) WebFOCUS Client (Managed Reporting) Data Source WebFOCUS Report Server Including a Non-MR Procedure (continued) debug_10 resides on the WebFOCUS Client debug_01s resides on the WebFOCUS Report Server Issue 10: A Standard Report in Managed Reporting is trying to include a procedure on the Report Server.

Copyright 2007, Information Builders. Slide 52 Issue 10: A Standard Report in Managed Reporting is trying to include a procedure on the Report Server. Solution: Including a Non-MR Procedure Solution Use –MRNOEDIT to pass commands “as is” to the Report Server.

Copyright 2007, Information Builders. Slide 53 No Report Review  Check to see if there are any error messages.  Usually fixing the first one clears up subsequent error messages.  If there are no error messages, check your selection criteria.  Common Remedies  Don’t use sort fields from independent paths.  Use WHERE TOTAL to screen on aggregated data.  Avoid column notation by creating “shadow” fields.  For Managed Reporting, use –MRNOEDIT to pass commands directly to the Report Server.

Copyright 2007, Information Builders. Slide 54  Helpful Commands: No Report Review (continued) To display additional information for an error message ? error_nbr To pass Managed Report commands to the Report Server -MRNOEDIT BEGIN command … -MRNOEDIT END

55 Copyright 2007, Information Builders. Slide 55 Relational Database Considerations

Copyright 2007, Information Builders. Slide 56 RDBMS Response Time Problem Sorted by length of Category description Issue 11: A report is taking a long time to run. Data is retrieved from a relational database and aggregated into product categories.

Copyright 2007, Information Builders. Slide 57 RDBMS Response Time Problem (continued) Issue 11: A report is taking a long time to run. Data is retrieved from a relational database and aggregated into product categories. WebFOCUS aggregated the data

Copyright 2007, Information Builders. Slide 58 RDBMS Response Time Problem (continued) Issue 11: A report is taking a long time to run. Data is retrieved from a relational database and aggregated into product categories. Text editor to create tracing statements

Copyright 2007, Information Builders. Slide 59 CommandPurpose SET TRACEOFF=ALL Turn off all current traces. SET TRACEON=SQLAGGR… Show if RDBMS will aggregate the data. SET TRACEON=STMTRACE… Show SQL code generated. SET TRACEUSER=CLIENT Display traces in a Web page. SET XRERTIEVAL = OFF Do not execute the procedure. RDBMS Response Time Problem (continued) Issue 11: A report is taking a long time to run. Data is retrieved from a relational database and aggregated into product categories.

Copyright 2007, Information Builders. Slide 60 RDBMS Response Time Problem (continued) WebFOCUS will have to aggregate the data Issue 11: A report is taking a long time to run. Data is retrieved from a relational database and aggregated into product categories.

Copyright 2007, Information Builders. Slide 61 RDBMS Response Time Problem (continued) Issue 11: A report is taking a long time to run. Data is retrieved from a relational database and aggregated into product categories. CATLEN is used as a sort field and cannot be converted to SQL code

Copyright 2007, Information Builders. Slide 62 RDBMS Response Time Problem Solution Order report by column Issue 11: A report is taking a long time to run. Data is retrieved from a relational database and aggregated into product categories. Solution: Compute CATLEN and use Order Report By (BY TOTAL)

Copyright 2007, Information Builders. Slide 63 RDBMS Response Time Problem Solution (continued) Issue 11: A report is taking a long time to run. Data is retrieved from a relational database and aggregated into product categories. Solution: Compute CATLEN and use Order Report By (BY TOTAL) RDBMS will aggregate the data

Copyright 2007, Information Builders. Slide 64 RDBMS Response Time Problem Solution (continued) RDBMS aggregated the data Issue 11: A report is taking a long time to run. Data is retrieved from a relational database and aggregated into product categories. Solution: Compute CATLEN and use Order Report By (BY TOTAL)

Copyright 2007, Information Builders. Slide 65 Relational Database Considerations Review  When the RDBMS cannot aggregate the data:  Individual rows are returned to the WebFOCUS Report Server from the RDBMS.  WebFOCUS Report Server will have to aggregate the data.  Processing is slowed down.  Common Remedies  Turn on traces to determine if the RDBMS is to aggregate the data.  Use SET XRETRIEVAL=OFF to not retrieve data when tracing.  Avoid defining sort fields that will turn off aggregation; if possible, compute them instead. For more information, see: Course 402 – Reporting Concepts and Efficiencies for Relational Databases

66 Copyright 2007, Information Builders. Slide 66 Other Considerations

Copyright 2007, Information Builders. Slide 67 Parameterized Reports Question: How can I display the value of variables? Answer A: Use &ECHO and SET XRETRIEVAL

Copyright 2007, Information Builders. Slide 68 Parameterized Reports (continued) Question: How can I display the value of just the variables? Answer B: Use -? and -EXIT

Copyright 2007, Information Builders. Slide 69 Parameterized Reports (continued) Review To control the display of Dialogue Manager variables: -SET &ECHO = OFF|ON|ALL; To display of Dialogue Manager variables: -? &[&]variable To control creating a report or not: SET XRETRIEVAL ON|OFF To terminate a procedure: -EXIT

Copyright 2007, Information Builders. Slide 70 Using -EXIT Note: Except for debugging purposes, avoid using –EXIT: ReportCaster may not work properly. A procedure that is included with a –EXIT will terminate the procedure invoking it. Note: Except for debugging purposes, avoid using –EXIT: ReportCaster may not work properly. A procedure that is included with a –EXIT will terminate the procedure invoking it.

Copyright 2007, Information Builders. Slide 71 Profiles  Profiles are files that contain commands.  Can contain any valid report server core language command.  Executed every time a procedure is run in WebFOCUS.  Three types of profiles:  Global  Group  Executed after the global profile  Can override commands found in the global profile  User  Executed after the group profile  Can override commands in the group profile  Commands in a procedure override commands in a profile. Question: Why does a procedure work for one user, but not another? Answer A: Check for Profiles Note: Never assume a setting; establish it in your procedure.

Copyright 2007, Information Builders. Slide 72 Application Namespace, commonly referred to as APP PATH, is the search sequence used to locate the metadata and procedures needed by the WebFOCUS Report Server. Application Namespace Question: Why does a procedure work for one user, but not another? Answer B: Application Namespace

Copyright 2007, Information Builders. Slide 73 Application Namespace (continued) Question: How can I display the APP path search order? Answer: Use APP SHOWPATH

Copyright 2007, Information Builders. Slide 74 WHENCE Command Question: How do I know from which application the metadata is being used? Answer: Use the WHENCE command EMPINFO.MAS in the DEBUG application will be used To display from which application a file will be utilized: WHENCE filename FOCEXEC|MASTER|ACCESS|FOCSTYLE|FOCUS

Copyright 2007, Information Builders. Slide 75 Additional Help Question: What can I do when all else fails? Answer: WebFOCUS Development Center Focal Point is a free online Q&A Bulletin Board

Copyright 2007, Information Builders. Slide 76  Debugging is not an exact science.  Never assume anything.  Try to isolate the problem and work from there.  Sometimes the strangest errors have the simplest solutions.  Look at what is and not what you are expecting.  Debugging is an acquired skill based on experience.  Learn as much as possible about the product and tools.  The more you know, the more quickly you will be able solve problems. Review