Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "1 Copyright 2007, Information Builders. Slide 1 Nat Poe WebFOCUS Debugging Techniques."— Presentation transcript:

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

2 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

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

4 4 Copyright 2007, Information Builders. Slide 4 Incorrect Output

5 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

6 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.

7 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

8 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

9 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.

10 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.

11 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.

12 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.

13 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.

14 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

15 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

16 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.

17 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.

18 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.

19 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.

20 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.

21 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.

22 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.

23 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.

24 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.

25 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!

26 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.

27 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.

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

29 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.

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

31 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%.

32 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%.

33 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.

34 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

35 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 36 Copyright 2007, Information Builders. Slide 36 No Report

37 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.

38 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

39 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

40 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.

41 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

42 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

43 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.

44 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.

45 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

46 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.

47 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.

48 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.

49 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.

50 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.

51 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.

52 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.

53 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.

54 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 55 Copyright 2007, Information Builders. Slide 55 Relational Database Considerations

56 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.

57 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

58 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

59 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.

60 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.

61 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

62 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)

63 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

64 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)

65 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 66 Copyright 2007, Information Builders. Slide 66 Other Considerations

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

68 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

69 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

70 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.

71 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.

72 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

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

74 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

75 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

76 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


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

Similar presentations


Ads by Google