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 would create a flat file (SAVE/HOLD) of datamart names. Then I would use a Dialogue Manager loop to read and process each datamart.
Something like this example:
SET HOLDLIST=PRINTONLY
SET PAGE=NOLEAD
TABLE FILE CAR
PRINT
COUNTRY
BY COUNTRY NOPRINT
ON TABLE SAVE AS S001
END
-RUN
-SET &NBR_COUNTRY = &LINES;
-REPEAT END_REP1 &NBR_COUNTRY TIMES
-READ S001 NOCLOSE &COUNTRY.A10.
TABLE FILE CAR
SUM SALES
BY CAR
BY MODEL
HEADING
"SALES FOR <COUNTRY"
WHERE COUNTRY EQ '&COUNTRY'
END
-RUN
-END_REP1
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Don't use LIST, use PRINT or SUM ... BY. List adds an extra field in the output hold file.
Add HOLDLIST=PRINTONLY to make sure only the fields you really need are in the HOLD file. That COMPUTE will cause DATAMART_NAME and DM_NAME_JUST to be in the HOLD file.
Use NOCLOSE with -READ when the Dialogue Manager loop does other things than Dialogue Manager.
Use HOLDFORMAT=ALPHA when you want to -READ to ensure that the field lengths arte what you think they are.
Don't forget to check for end of file with IORETURN.
I prefer using a -REPEAT statement, much cleaner code.
You don't really need the &I counter.
So many lessons in one short program!
-SET &ECHO=ALL;
SET HOLDLIST=PRINTONLY
SET HOLDFORMAT=ALPHA
TABLE FILE CAR
PRINT
COMPUTE DM_NAME_JUST/A30 = LJUST(30,COUNTRY,DM_NAME_JUST) ;
ON TABLE HOLD AS YYY
END
-RUN
?FF YYY
-SET &NUMRECS = &RECORDS;
-SET &I = 0;
-STARTLOOP
-SET &I = &I + 1;
-READ YYY NOCLOSE &LEVEL.&I.A30.
-IF &IORETURN NE 0 GOTO ENDLOOP;
-SET &JOINER = 'J' || &I ;
JOIN STORE_NUMBER IN AZ_HIERARCHY TO STORE_NUM IN &LEVEL.&I AS &JOINER
-RUN
-IF &I LT &NUMRECS GOTO STARTLOOP;
-ENDLOOP
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
USE
FOCFILE1.FOC AS MYFOCFILE
FOCFILE2.FOC AS MYFOCFILE
FOCFILEn.FOC AS MYFOCFILE
END
JOIN STORE_NUMBER IN AZ_HIERARCHY TO STORE_NUM IN MYFOCFILE AS J1