Walter F. Blood Information Builders Nashville User Forum February 23, 2012 THINKing in WEBFOCUS.

Slides:



Advertisements
Similar presentations
Chapter 12 File Processing and Data Management Concepts
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 Walter Brengel Information Builders New Jersey User Forum – June 2008 FOCUS to SQL DeMystified.
The University of North Carolina at Greensboro
Copyright 2007, Information Builders. Slide 1 Accumulation Techniques for Reporting with WebFOCUS Kyle Hachey Systems Engineer.
1 Copyright 2007, Information Builders. Slide 1 Nat Poe WebFOCUS Debugging Techniques.
Concepts of Database Management Sixth Edition
Copyright 2007, Information Builders. Slide 1 Internals of Retrieval for TABLE/TABLEF/MATCH FILE Cesare Petrizio Information Builders.
1 Reporting Internals From a Reports Point of View Renee Teatro Customer Support Services.
Copyright 2007, Information Builders. Slide 1 Tips and Techniques From the FOCWIZARDs Art Greenhaus & Noreen Redden FOCWIZARDS Tech Summit, 2008.
Exploring Microsoft Excel 2002 Chapter 7 Chapter 7 List and Data Management: Converting Data to Information By Robert T. Grauer Maryann Barber Exploring.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
CS263 Lecture 19 Query Optimisation.  Motivation for Query Optimisation  Phases of Query Processing  Query Trees  RA Transformation Rules  Heuristic.
Introduction to Structured Query Language (SQL)
Mgt 240 Lecture MS Excel and Access: Introduction to Databases September 23, 2004.
Mary K. Olson PS Reporting Instance – Query Tool 101.
Access Tutorial 3 Maintaining and Querying a Database
Tutorial 5: Working with Excel Tables, PivotTables, and PivotCharts
Database Programming Sections 5– GROUP BY, HAVING clauses, Rollup & Cube Operations, Grouping Set, Set Operations 11/2/10.
“You Asked For It, You Got It!” Best New [Backend ] Features of WebFOCUS Renee Teatro Information Builders December 2011.
1 JOIN: Rules, Roles, and Conventions Floria Foote June 2008.
Advanced File Processing
Copyright 2007, Information Builders. Slide 1 JOIN, MATCH and MORE– Making the Connections Walter F. Blood Technical Director, FOCUS Division May, 2011.
Copyright 2007, Information Builders. Slide 1 Tips and Techniques for FOCUS 76 Did You Know? Walter F. Blood Information Builders, Inc.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
“You Asked For It, You Got It!” Best New [Backend ] Features of WebFOCUS Walter Blood Noreen Redden Joel Starkman Information Builders, Inc. August,
Tips n Techniques Jenny Lalik. Report Styling Enhancements for 7.7  Accordion By Row  Excel 2007 Output Format  Hide Null Across Columns  Pass dates.
Analyzing Data For Effective Decision Making Chapter 3.
1 FOCUS Internals: Part 1 Update for 7.6.x Renee Teatro FUN Conference August 2008 Internals of Retrieval for TABLE/TABLEF/MATCH FILE.
Concepts of Database Management Seventh Edition
Tips n Techniques Jenny Lalik. Report Styling Enhancements for 7.7  Accordion By Row  Excel 2007 Output Format  Hide Null Across Columns  Pass dates.
“You Asked For It, You Got It!” Best New [Backend ] Features of WebFOCUS Walter Blood Noreen Redden Joel Starkman Information Builders, Inc. June.
Copyright 2007, Information Builders. Slide 1 JOIN, MATCH and MORE– Making the Connections Walter F. Blood Technical Director, FOCUS Division June, 2009.
A Guide to SQL, Seventh Edition. Objectives Understand how to use functions in queries Use the UPPER and LOWER functions with character data Use the ROUND.
Database Applications – Microsoft Access Lesson 4 Working with Queries 36 Slides in Presentation.
XP. Objectives Sort data and filter data Summarize an Excel table Insert subtotals into a range of data Outline buttons to show or hide details Create.
1 The Master That Tells All Floria Foote Information Builders June 2008.
Copyright 2007, Information Builders. Slide 1 FOCUS Internals: Part 2 Update for 7.6.x Renee Teatro FUN Conference August 2008 Internals of Output Processing.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 7 (Part II) INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) Instructor.
The Advantage Series © 2004 The McGraw-Hill Companies, Inc. All rights reserved Creating Select Queries Chapter 6 Microsoft Office Access 2003.
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Aliya Farheen October 29,2015.
Lesson 13 Databases Unit 2—Using the Computer. Computer Concepts BASICS - 22 Objectives Define the purpose and function of database software. Identify.
JOIN Syntax and Techniques Noreen Redden Information Builders Copyright 2011, Information Builders. Slide 1.
Session 9 Accessing Data from a Database. RDBMS and Data Management/ Session 9/2 of 34 Session Objectives Describe the SELECT statement, its syntax and.
Excel part 5 Working with Excel Tables, PivotTables, and PivotCharts.
DAY 18: MICROSOFT ACCESS – CHAPTER 3 CONTD. Akhila Kondai October 21, 2013.
A Guide to SQL, Eighth Edition Chapter Four Single-Table Queries.
Copyright 2007, Information Builders. Slide 1 TABLE FILE: The Basics Noreen Redden FOCWizard June, 2008.
Lesson 4: Querying a Database. 2 Learning Objectives After studying this lesson, you will be able to:  Create, save, and run select queries  Set query.
Manipulating Data Lesson 3. Objectives Queries The SELECT query to retrieve or extract data from one table, how to retrieve or extract data by using.
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
Simple Queries DBS301 – Week 1. Objectives Basic SELECT statement Computed columns Aliases Concatenation operator Use of DISTINCT to eliminate duplicates.
Aggregator Stage : Definition : Aggregator classifies data rows from a single input link into groups and calculates totals or other aggregate functions.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
Concepts of Database Management, Fifth Edition Chapter 3: The Relational Model 2: SQL.
1 ORACLE I 3 – SQL 1 Salim Phone: YM: talim_bansal.
SIMPLE FILTERS. CONTENTS Filters – definition To format text – pr Pick lines from the beginning – head Pick lines from the end – tail Extract characters.
Retrieving Data Using the SQL SELECT Statement
Prof: Dr. Shu-Ching Chen TA: Hsin-Yu Ha
A Guide to SQL, Seventh Edition
Writing Basic SQL SELECT Statements
Chapter 6 - Database Implementation and Use
Tutorial 5: Working with Excel Tables, PivotTables, and PivotCharts
The Basics of FOCUS Reporting Syntax
What Happens When You Run A Report
Prof: Dr. Shu-Ching Chen TA: Yimin Yang
Prof: Dr. Shu-Ching Chen TA: Hsin-Yu Ha
Prof: Dr. Shu-Ching Chen TA: Haiman Tian
Contents Preface I Introduction Lesson Objectives I-2
Presentation transcript:

Walter F. Blood Information Builders Nashville User Forum February 23, 2012 THINKing in WEBFOCUS

Thinking in WebFocus Retrieve DEFINE Screening FOCUS or External Sort Aggregation COUNT/MIN/MAX TOTAL Screens COMPUTE Format Extracts Analysis Report Generator Matrix Output Generator

Thinking in WebFOCUS Analysis n Verify DBA access to file(s) n Determine I/O access modules required n Process DEFINE field expressions for pertinent files n Read and parse the request n Check DBA and set up access restrictions at SEGMENT and FIELD levels n Open and parse Master File Descriptions

Thinking in WebFOCUS Analysis n Activate fields (real and DEFINEd) n Read USE list and/or check Access Files and FILEDEF/ALLOCATES n Open and Verify files n Activate segments: referenced subtree(s) n Smallest subtree which contains “root” and every segment referenced directly or indirectly (HEADING PARENT AND GRAND CHILD)

Thinking in WebFOCUS Retrieval  Unique segments are promoted into path of parent and are never missing  IF/WHERE tests on database fields are evaluated upon retrieval  DEFINE fields are evaluated if needed  IF/WHERE tests are evaluated on DEFINE fields on segment by segment basis, AFTER all other selection tests are passed  Each Path is processed independently, and fields are merged on common sort fields n Retrieval is “Top Down, Left Right” within the referenced sub-tree

Thinking in WebFOCUS Retrieval - SQL  WebFOCUS converted to SQL  Levels of optimization  Join  Selection  Aggregation  DEFINEd fields  Unoptimized – done in WebFOCUS  Returns data at the Internal Matrix level or before n SQL interface retrieval optimized

Thinking in WebFOCUS Structures SH2 KU K EMP_ID SPOUSE JOIN EMP_ID IN EMPLOYEE TO EMP_ID IN SPICE AS AJ EMP_ID FIRST_NAME LAST_NAME COVER_DT TYPE_COVER FAMILY JOIN EMP_ID IN EMPLOYEE TO ALL EMP_ID IN KIDS AS BJ EMP_ID CHILD_DOB CHILD_NAME K KM

SEG1 01 S1 ************** *EMP_ID ** *FIRST_NAME ** *LAST_NAME ** * ** *************** ************** I I I I I SEGS I SEGK I INSSEG 02 I KU 03 I KM 04 I SH ************** :EMP_ID :K :EMP_ID ::K *COVER_DT ** :SPOUSE : :CHILD_DOB :: *TYPE_COVER ** : : :CHILD_NAME :: *FAMILY ** : : : :: * ** : : : :: *************** JOINED SPICE : ************** JOINED KIDS Thinking in WebFOCUS Structures JOIN EMP_ID IN EMPLOYEE TO EMP_ID IN SPICE AS J1 SEG1 01 S1 ************** *EMP_ID ** *FIRST_NAME ** *LAST_NAME ** * ** *************** ************** I I I I SEGS I INSSEG 02 I KU 03 I SH ************** :EMP_ID :K *COVER_DT ** :SPOUSE : *TYPE_COVER ** : : *FAMILY ** : : * ** : : *************** JOINED SPICE ************** JOIN EMP_ID IN EMPLOYEE TO ALL EMP_ID IN KIDS AS J2 Limit 1024 segments in structure Limit 1023 Joins

Thinking in WebFOCUS DEFINE  Segment is determined by  WITH field  Fields used in expression  Constant expressions are evaluated when file is opened (segment 0)  DEFINEs are evaluated ONLY if required by request  DEFINEs are evaluated at detail level only Each DEFINE field is associated with a specific segment

Thinking in WebFOCUS Order of Retrieval – FOCUS Files  Root segment instances are obtained in physical order  Lower level instances obtained in SEGTYPE order within parent segment  TABLEF  Root and child segment instances are obtained in SEGTYPE order  No sorting n TABLE/GRAPH/MATCH

Thinking in WebFOCUS Order of Retrieval – FOCUS Files  Fieldname is not indexed Segment containing “fieldname” becomes ROOT of the view, and is retrieved physically  Fieldname is indexed Segment containing “fieldname” is accessed via the equality test on INDEX  Other segments become children of the new root segment  TABLE FILE filename.fieldname

Thinking in WebFOCUS Order of Retrieval – FOCUS Files Alternate Physical View is created through the referenced segment highest in the hierarchy SET AUTOINDEX=ON Alternate Indexed View is created if there is an Equality test specified for an indexed field on the referenced segment highest in the hierarchy SET AUTOSTRATEGY=ON Equality IF/WHERE test on primary key field in logically retrieved segment will terminate “chain chasing” as soon as possible SET AUTOPATH = ON

Thinking in WebFOCUS Autostrategy – FOCUS Files IL MI WHERE DATE EQ ‘9912’ 1 STATE=IL,DATE=0002Continue Search 2 STATE=IL, DATE=0001Continue Search 3 STATE=IL, DATE=9912Continue Search 4 STATE=IL, DATE=9911Next Parent 5 STATE=MI, DATE=9911Next Parent STATE DATE

Thinking in WebFOCUS FIXRETRIEVE – SUFFIX=FIX SET FIXRETRIEVE=ON  Equality IF/WHERE test on primary specified sort field in single segment FIX file will terminate retrieval as soon as possible FILE=TESTFI,SUFFIX=FIX SEGNAME=TESTSEG,SEGTYPE=S1 FIELD=COUNTRY,E01,A10,A10,$ FIELD=CAR,E02,A16,A16,$ ENGLAND JAGUAR ENGLAND JENSEN ENGLAND TRIUMPH FRANCE PEUGEOT ITALY AUDI WHERE COUNTRY EQ ‘FRANCE’ Retrieval stops if: Set FIXRETRIEVAL = ON

Thinking in WebFOCUS Multiple Paths  Unique segments are always in the path of their parent  Unique segments are SEGTYPE = U, KU, DKU, KLU  JOIN TO creates DKU segments  JOIN TO ALL creates DKM segments  TABLE/MATCH/GRAPH  Instances from each path will be merged in the sort process by the common parent(s)  TABLEF does not merge data from multiple paths  Alternate file views can be used to create single paths  SET MULTIPATH controls multiple path retrieval n Retrieval is performed for each path separately

Thinking in WebFOCUS Multiple Paths ARRIVE_TIME ARR_FLIGHT ARR_FROM DEPART_TIME DEP_FLIGHT DEPART_TO Airport

Thinking in WebFOCUS Multiple Paths DEFINE FILE AIRPORTS.ARRIVE_TIME DELAY=DEPART_TIME – ARRIVE_TIME; END TABLE FILE AIRPORTS.ARRIVE_TIME PRINT DEP_FLIGHT DEPART_TIME WHERE AIRPORT EQ ‘O’’HARE’ WHERE DELAY GT 60 WHERE DEPART_TO EQ ‘LAX’ WHERE ARR_FROM EQ ‘TOR’ END ARRIVE_TIME ARR_FLIGHT ARR_FROM DEPART_TIME DEP_FLIGHT DEPART_TO Airport

Thinking in WebFOCUS Multiple Paths FAMILY INVESTMENT FAMILY COLLEGE FAMILY

Thinking in WebFOCUS Multiple Paths Instances 1 AI BM 2 BM C 3 CI D FAMILY COLLEGE FAMILY INVESTMENT

Thinking in WebFOCUS Multiple Paths TABLE FILE SAMPLE PRINT COLLEGE INVEST BY FAMILY WHERE COLLEGE EQ ‘B’ WHERE INVEST EQ ‘ I ’ END FAMILY COLLEGE INVEST B I 2 B. 3. I FAMILY COLLEGE INVEST B I SET MULTIPATH=SIMPLE SET MULTIPATH=COMPOUND

Thinking in WebFOCUS Retrieval - Short Paths  High level segments with missing referenced descendents rejected (short path)  SET ALL=ON -- JOIN LEFT_OUTER  High level segments with missing referenced descendents accepted (missing fails IF/WHERE tests)  SET ALL=PASS  High level segments with qualified or missing referenced descendents accepted (missing passes IF/WHERE tests) n SET ALL=OFF -- JOIN INNER

Thinking in WebFOCUS Retrieval - Short Paths  Referenced, not present, Unique Segments are defaulted to blanks for alpha fields, zeros for numerics  Unique segments do not create short paths. Therefore, ALL settings are irrelevant for Unique segments.  Note: Missing referenced descendents of missing unique segments revert to ALL=OFF logic  Unique segments (U, KU, DKU, and KLU) are never considered missing

Thinking in WebFOCUS Internal Matrix Generation  One row for each distinct combination of sort keys  One column for each verb object  Computed columns, row and column totals, subtotals, and summaries are not yet done  All data is in internal form The output of the SORT/MERGE phase is conceptually a matrix

Thinking in WebFOCUS Internal Matrix - Contents  Fields following a verb  Fields used in COMPUTEs not previously mentioned  Fields used in HEADINGs or FOOTINGs  Fields used in SUBHEADs or SUBFOOTs, not previously mentioned  MISSING fields are not counted Sort Fields  BY fields  ACROSS fields (used as low order BY at sort phase)  FOCLIST (verb is PRINT or LIST) Verb Objects (both SUM and COUNT are calculated)

Thinking in WebFOCUS Multiple Verb Sets - limits n Up to 16 verbs with associated BY fields can be specified n Up to 128 sort fields may be specified n Up to 1024 verb objects may be specified

Thinking in WebFOCUS Multiple Verb Sets EAST210 NORTH150 SOUTH30 WEST10 SUM SALES BY DIVISION DIV SALES SUM SALES BY DIVISION BY YEAR YEAR SALES LIST SALES BY DIVISION BY YEAR FOCLIST SALES

Thinking in WebFOCUS Internal Matrix - Sorting  Aggregation is performed as record is sorted, with FOCUS sort  Aggregation is performed by external sort if SET EXTAGGR = ON  Numeric Fields are added. Alpha fields being SUMmed, return the LAST value within the BY field, the FST value with external sorts  (SET SUMPREFIX=LST if required)  All verb objects are also COUNTed

Thinking in WebFOCUS Merge – FOCUS Sort SORT MERGE FOCSORT BINs FOCSORT BINs SORT MERGE BINs FOCSORT

Thinking in WebFOCUS EXTSORT = ON, AUTOTABLEF = OFF FOCSORT BINs ~ First 5000 Records EXTSORT BINs Subsequent Records S001WK09 S001WK08 S001WK07 S001WK06 S001WK05 S001WK04 S001WK03 S001WK02 S001WK01 FOCSORT SORT MERGE FOCSORT

Thinking in WebFOCUS EXTSORT = ON, AUTOTABLEF = ON S001WK09 S001WK08 S001WK07 S001WK06 S001WK05 S001WK04 S001WK03 S001WK02 S001WK01 EXTSORT Subsequent Records OFFLINE Extract Hotscreen Or… BINs ~ First 5000 Records

Thinking in WebFOCUS Output Stage SORT Internal Matrix FOCSML Report Extract Formatting/Stylsheets HOLD/PCHOLD/SAVE FML/EMR Processor Secondary Sort Post Matrix Processing COMPUTE’s IF/WHERE TOTAL BY TOTAL Totals…

Thinking in WebFOCUS BY TOTAL PAGE 1 PIN AVE DEPT SALARY COUNT SALARY ACCOUNTING $283, $56, SALES $395, $56, MARKETING $570, $51, CUSTOMER SUPPORT $198, $49, PROGRAMMING & DVLPMT $182, $45, PERSONNEL $216, $43, CONSULTING $126, $42, ADMIN SERVICES $56, $28, TABLE FILE EMPDATA SUM SALARY CNT.PIN COMPUTE AVGSAL=SALARY/CNT.PIN; AS 'AVE,SALARY' BY HIGHEST TOTAL AVGSAL NOPRINT BY DEPT END

Thinking in WebFOCUS Output Stage SORT Internal Matrix FOCSML Report Extract Formatting/Stylesheets HOLD/PCHOLD/SAVE FML/EMR Processor Secondary Sort Post Matrix Processing COMPUTE’s IF/WHERE TOTAL BY TOTAL Totals…

Thinking in WebFOCUS ON Sortfield Options  Subtotaling – BY and ACROSS  SUBTOTAL and SUB-TOTAL  RECOMPUTE and SUMMARIZE  MULTILINE suppresses operation if only single detail line  RECAP (COMPUTE)  SUBFOOT/SUBHEAD

Thinking in WebFOCUS Totaling BY specified only and TABLE * BY specified plus Higher Bys TABLE * ADD’s all numeric columns SUBTOTAL COLUMN-TOTAL SUB-TOTAL Recalculates COMPUTE’s ADD’s up other numeric columns RECOMPUTESUMMARIZE * NOTOTAL Suppresses Grand Totals

Thinking in WebFOCUS ON Sortfield Options - Format  PAGE-BREAK [REPAGE]  NOSPLIT  **FOLD-LINE  **SKIP-LINE  UNDERLINE ** May be specified on verb-objects

Thinking in WebFOCUS ON TABLE Options  Totaling – ON TABLE…  COLUMN-TOTAL  ROW-TOTAL  SUMMARIZE  NOTOTAL  RECAP  [PAGE-BREAK AND ] SUBFOOT/SUBHEAD

Thinking in WebFOCUS HEADings and FOOTings  References to fields in SUBHEAD and SUBFOOT become verb objects only if not previously mentioned  Fields used in HEADINGs and SUBHEADs are taken from the first line within the group (BY phrase or page)  References to fields in HEADING and FOOTING become verb objects with the first verb

Thinking in WebFOCUS ON TABLE Extract Options  Extracts  ON TABLE HOLD [FORMAT …]  ON TABLE PCHOLD [FORMAT…]  ON TABLE SAVE [FORMAT…]  SET commands specific to format  Interface SET  WebFOCUS SET

Thinking in WebFOCUS