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.
I have two DB2 tables. One is a fact table (COMM_CUST_REPTG_F) with amounts. The second is a lookup table (AMOUNT_BAND_D) that groups the amounts into bands or ranges. The report summarizes the amounts in the fact table grouped by the ranges in the lookup table. Is this possible with WebFOCUS code (not SQL pass-through)? As you can see, there's no join field. The SQL:
SELECT
T1.BAND_DS,
SUM(T2.TOT_AUTH_AMT)
FROM BSLC.AMOUNT_BAND_D T1,
BSLC.COMM_CUST_REPTG_F T2
WHERET2.TIME_DIM_KEY = 37488 AND
(T2.TOT_AUTH_AMT >=
T1.BAND_FROM_AMT AND
T2.TOT_AUTH_AMT <=T1.BAND_TO_AMT)
GROUP BY T1.BAND_DS
ORDER BY T1.BAND_DS
FOR FETCH ONLY
Perhaps the IN-GROUPS-OF might work for you or a define, I'm not sure as to your look-up table
This code: TABLE FILE HOLDD HEADING CENTER "FISAPP &YEARSDESC PART II SECTION F #26 - #39" "UNDERGRADUATE DEPENDENT WITH AND WITHOUT DEGREES ELEGIBLE FOR AID" "REPORT RUN &DATE" SUM CNT.STUID AS 'RECIPIENT' BY INCOME IN-GROUPS-OF 3000 AS 'BOTTOM,BRACKET' ACROSS DEGREE AS '' ACROSS ENROLL AS '' IF SA1W1 EQ 'D' IF SGRADE EQ 'U' IF AUTOEFC NE 'Y' ON TABLE COLUMN-TOTAL ON TABLE SET ONLINE-FMT PDF ON TABLE SET STYLE * TYPE=REPORT, ORIENTATION = LANDSCAPE, FONT = COURIER, SIZE = 9, $ ENDSTYLE END Gives this report: PAGE 3 FISAPP 2004=05 PART II SECTION F #26 - #39 UNDERGRADUATE DEPENDENT WITH AND WITHOUT DEGREES ELEGIBLE FOR AID REPORT RUN 07/12/05 NO BACC YES BACC FULL PART FULL PART BOTTOM BRACKET 375000 1 0 0 0 381000 0 1 0 0 384000 0 1 0 0 423000 0 1 0 0 426000 0 1 0 0 429000 1 0 0 0 504000 1 0 0 0 690000 1 1 0 0 1002000 1 0 0 0 TOTAL 3603 2283 360 79
This was last page and pdf doesn't cut paste well
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
Have you considered using conditional joins like in the example below using the sample Employee DB
SET ALL=ON JOIN FILE EMPLOYEE AT EMP_ID TAG T1 TO ALL FILE JOBLIST AT JOBCLASS TAG T2 AS JC1 WHERE T1.CURR_SAL GE T2.LOWSAL; WHERE T1.CURR_SAL LE T2.HIGHSAL; END TABLE FILE EMPLOYEE SUM T1.CURR_SAL BY T2.JOBDESC END
M
Posts: 33 | Location: New York, USA | Registered: August 11, 2003
Wow, I've never used this before. Thanks for the tip.
quote:
Using conditional JOIN syntax, you can establish joins based on conditions other than equality between fields. In addition, the host and cross-referenced join fields do not have to contain matching formats, and the cross-referenced field does not have to be indexed. The conditional join is supported for FOCUS and for VSAM, ADABAS, IMS, and all relational data sources. Because each data source differs in its ability to handle complex WHERE criteria, the optimization of the conditional JOIN syntax differs depending on the specific data sources involved in the join and the complexity of the WHERE criteria.
Thanks a million for pointing me to the Conditional Join, I've never used it and I have over 15 years of FOCUS experience! You can always learn something new.
In at least WebFOCUS 5.2.3, there appears to be what I'd call a bug: The host Master file name cannot be longer than 8 characters. The cross-referenced Master file name can be longer than 8 characters.
This is a problem as, in our DB2 data-mart, table names are very long. I have temporarily solved it by creating a copy of the master and access file with smaller names.
The error I get when using a host master file name of longer than 8 characters is:
(FOC1822) WARNING. INVALID SYMBOL: v
A symbol in the master file is not recognized. Please consult the documentation for a description of all the valid master file attributes.
Oddly, the following disclaimer is at the end of the document,
quote:
If possible, shorten the length of the master names. However, this may change the behavior so that it does not do a non-equijoin. It may retrieves all records from each table in the sql, then do the join locally with the subset data. This is not efficient with large amounts of data.
I did not know that the name of the Master has an effect on the generated SQL!