WebFOCUS Debugging Techniques

1 / 76

# WebFOCUS Debugging Techniques - PowerPoint PPT Presentation

WebFOCUS Debugging Techniques. Nat Poe. Introduction. “Anything that can go wrong will go wrong.” -Murphy’s Law. The strangest errors can have the simplest solutions. Finding bugs is an acquired skill based on experience. Contents. Incorrect Output No Report

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## WebFOCUS Debugging Techniques

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
1. Introduction “Anything that can go wrong will go wrong.” -Murphy’s Law • The strangest errors can have the simplest solutions. • Finding bugs is an acquired skill based on experience.

2. Contents • Incorrect Output • No Report • Relational Database Considerations • Other Considerations

3. Incorrect Output

4. 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 Salesthe bonus is 1% In Sales, thereshould be nobonus

5. Defined Field Problem (continued) Issue 1: A defined field doesn’t seem to calculate the correct value. Only Non-Sales department employees are to receive a 1% bonus. Remove sortingfor detail report Bonus is thesame from therecord above theSALES records

6. 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. Always code anELSE conditionin an IF statement In Sales, bonusis now correct

7. Aggregation Problem Issue 2: Adding a new field to the report changes the results. Aggregating Salaryby Division Salary is different

8. Aggregation Problem (continued) Issue 2: Adding a new field to the report changes the results. Target a group andrun detail reports Some employees are missing

9. Aggregation Problem (continued) Issue 2: Adding a new field to the report changes the results. First report useddata from EMPINFO Second report used data from TRNHIST

10. Aggregation Problem (continued) Issue 2: Adding a new field to the report changes the results. Unspecified defersto the “ALL” setting

11. Aggregation Problem (continued) Issue 2: Adding a new field to the report changes the results. To check the ALL setting

12. Aggregation Problem (continued) Issue 2: Adding a new field to the report changes the results. Salaries of employeesnot taking trainingwere excluded

13. 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 OuterJOINs override the ALL setting

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

15. MATCH FILE Problem (continued) Issue 3: Data is appearing with blank values when there should be values. The procedure is using MATCH FILE. Extracting all WEemployees and thematching courses

16. MATCH FILE Problem (continued) Issue 3: Data is appearing with blank values when there should be values. The procedure is using MATCH FILE. Create a report on CRSHOLD with no sort fields. Department and namelisted for first course only

17. MATCH FILE Problem (continued) Issue 3: Data is appearing with blank values when there should be values. The procedure is using MATCH 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. Old file New file

18. MATCH FILE Problem Solution 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. SUMEMPINFO fields instead MATCH now replicates the data

19. MATCH FILE Problem Solution (continued) 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. Report is now correct

20. Sort Group Calculation Problem Issue 4: Calculation for a subfoot is incorrect for some of the groups. The report is using a RECAP with invisible fields. Incorrect average Correct average

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

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

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

24. Sort Group Calculation Problem Solution 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. Note: Delete LET whenfinished debugging! RECAP for CA is: 10,730.00 / 4

25. Sort Group Calculation Problem Solution (continued) 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. Correct average

26. Incorrect Ratio Problem Issue 5: Wrong ratio displayed at the end of the report. Should be between1.8% and 2.6%

27. Incorrect Ratio Problem (continued) Issue 5: Wrong ratio displayed at the end of the report. Percentages were summed

28. Incorrect Ratio Problem Solution Issue 5: Wrong ratio displayed at the end of the report. Solution: Use Summarize instead of Column totals. Recalculated the Compute

29. Incorrect Column Total Problem Issue 6: Percentages don’t add up to 100%. Where is the other 2%?

30. Incorrect Column Total Problem (continued) Issue 6: Percentages don’t add up to 100%. Integer field Format changed toD6.1% for PCT ofSTAFF_CNTR

31. Incorrect Total Problem (continued) Issue 6: Percentages don’t add up to 100%. 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.

32. Incorrect Total Problem Fixed Issue 6: Percentages don’t add up to 100%. Solution: Change the format of the counter to a decimal number. Counter changed to afloating decimal format

33. Incorrect OutputReview • 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 UnspecifiedJOIN. • 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.

34. Incorrect OutputReview (continued) • Helpful Debugging Commands

35. No Report

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

37. Multi-path Problem (continued) Issue 7:Path error message occurs when running a report. Add an Othercomponent Query the error Detailedmessage

38. Multi-path Problem (continued) Issue 7:Path error message occurs when running a report. Delete the Othercomponent 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.

39. Multi-path Problem Solution Issue 7:Path error message occurs when running a report. Solution: Since Site is unique, specify a single path. Changed to asingle path

40. No Data Selected Issue 8: No data appears in a report when a selection statement is added. No selection statements Some statesexceed 5,000

41. No Data Selected (continued) Issue 8: No data appears in a report when a selection statement is added. Selection statement added

42. No Data Selected Solution Issue 8: No data appears in a report when a selection statement is added. Solution: Screen for aggregated values.

43. Column Notation Problem Issue 9: Changing a field format loses all data for a report. No data when theAvg Salary formatswere changed

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

45. Column Notation Problem (continued) Issue 9: Changing a field format loses all data for a report. Both average salaryformats were changedto whole numbers

46. Column Notation Problem (continued) Issue 9: Changing a field format loses all data for a report. C3 – Original FormatC4 – New Format There are now two columns: C1 – Original FormatC2 – New Format

47. Column Notation Problem Solution Issue 9: Changing a field format loses all data for a report. Solution: Define fields with the desired format and use them instead. Unique names for selection

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

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