As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
So I'm feeling a bit embarrassed as I've done this hundreds of times, but I went to put together a quick proof of concept of the McGyver Technique to help someone with an issue... And I can't get it to display properly. Can someone tell me what I'm doing wrong, because pretty sure this would have worked pre wf8.
DEFINE FILE CAR
BLANK/A1 WITH COUNTRY='1';
END
TABLE FILE CAR
SUM SALES RETAIL_COST
BY COUNTRY
BY BLANK
ON TABLE HOLD AS MY_HOLD FORMAT ALPHA
END
TABLE FILE MY_HOLD
SUM SALES RETAIL_COST
BY BLANK
BY COUNTRY
ON TABLE HOLD AS MY_HOLD2 FORMAT ALPHA
END
JOIN
INNER MY_HOLD.MY_HOLD.BLANK IN MY_HOLD TAG H1 TO MULTIPLE
MY_HOLD2.MY_HOLD2.BLANK IN MY_HOLD2 TAG H2 AS J0
END
TABLE FILE MY_HOLD
SUM H2.SALES H2.RETAIL_COST
BY H1.COUNTRY
BY H2.COUNTRY
ON TABLE PCHOLD FORMAT HTML
END
For this result set I would expect to get 25 rows, instead I'm getting 5. England in H1.COUNTRY and then each country in H2.
PAGE 1
COUNTRY COUNTRY SALES RETAIL_COST
ENGLAND ENGLAND 12000 45,319
FRANCE 0 5,610
ITALY 30200 51,065
JAPAN 78030 6,478
W GERMANY 88190 64,732
When I look at the error messages, I'm getting the below error for each value after England.
quote:
(FOC1072) DUPLICATES IN JOIN 'FROM' FIELD : MY_HOLD2/
I thought FOC1072 was just a warning and should allow me to create my cartesian join. What did I forget about? or is this a result of code tightening?This message has been edited. Last edited by: eric.woerle,
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
DEFINE FILE CAR
BLANK/A1 WITH COUNTRY='1';
END
-*
TABLE FILE CAR
SUM SALES RETAIL_COST
BY BLANK
BY COUNTRY
ON TABLE HOLD AS MY_HOLD FORMAT ALPHA
END
-*
TABLE FILE MY_HOLD
SUM SALES RETAIL_COST
BY BLANK
BY COUNTRY
ON TABLE HOLD AS MY_HOLD2 FORMAT FOCUS INDEX BLANK
END
-*
JOIN
BLANK IN MY_HOLD TAG H1 TO ALL
BLANK IN MY_HOLD2 TAG H2 AS J0
END
-*
TABLE FILE MY_HOLD
SUM H2.SALES H2.RETAIL_COST
BY H1.COUNTRY
BY H2.COUNTRY
ON TABLE PCHOLD FORMAT HTML
END
Yields 25 rows.
Basically, I only changed the cross-reference file from physical sequential to indexed.
If you need/want the cross-reference file to be physical sequential, you'll usually see parent/child attributes in the .mas.
More control, and no pesky index, alpha or whatever. Just focus files.
DEFINE FILE CAR
BLANK/A1 WITH COUNTRY='1';
END
TABLE FILE CAR
SUM SALES RETAIL_COST
BY BLANK
BY COUNTRY
ON TABLE HOLD AS H01
END
-*
TABLE FILE CAR
SUM SALES RETAIL_COST
BY BLANK
BY COUNTRY
ON TABLE HOLD AS H02
END
SQL
SELECT H01.*,
H02.*
FROM H01
INNER JOIN H02
ON H01.BLANK = H02.BLANK
;
TABLE HOLD AS H_CARTESIAN
END
TABLE FILE H_CARTESIAN
PRINT *
ON TABLE PCHOLD FORMAT HTML
END
And with "control" I mean. Consider these extra join-conditions
All joins expect with own : AND H01.COUNTRY <> H02.COUNTRY
no double records ( e.g. only alphabetically higher countries ) : AND H01.COUNTRY < H02.COUNTRY
Greets,
_____________________ WF: 8.0.0.9 > going 8.2.0.5
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010
Better yet, in SQL you do not need the BLANK column as the default join is a cartesian product:
TABLE FILE CAR
SUM SALES RETAIL_COST
BY COUNTRY
ON TABLE HOLD AS H01
END
TABLE FILE CAR
SUM SALES RETAIL_COST
BY COUNTRY
ON TABLE HOLD AS H02
END
SQL
SELECT H01.*, H02.*
FROM H01, H02
;
TABLE HOLD AS H_CARTESIAN
END
TABLE FILE H_CARTESIAN
PRINT *
ON TABLE PCHOLD FORMAT HTML
END
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :