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.
TABLE FILE CAR
PRINT CAR
COMPUTE SAME_COUNTRY/I1=COUNTRY EQ LAST COUNTRY; NOPRINT
COMPUTE WK_CAR/A18=IF SAME_COUNTRY EQ 0 THEN CAR ELSE '; ' | CAR; NOPRINT
COMPUTE CAR_LEN/I6=ARGLEN(17,WK_CAR,'I6'); NOPRINT
COMPUTE TOTAL_LEN/I6=IF SAME_COUNTRY EQ 0 THEN CAR_LEN ELSE LAST TOTAL_LEN+CAR_LEN; NOPRINT
COMPUTE ALL_CARS/A180=IF SAME_COUNTRY EQ 0 THEN WK_CAR ELSE OVRLAY(ALL_CARS,180,WK_CAR,CAR_LEN,LAST TOTAL_LEN+1,'A180');
BY COUNTRY
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD
END
TABLE FILE HOLD
SUM LST.ALL_CARS
BY COUNTRY
END
One thing to consider is the maximum number of CAR values per COUNTRY. This assumes a max of 10 CAR values per COUNTRY.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006
With the power and flexibility of the WebFOCUS language, there is often more than one way of meeting a requirement, giving the developer to freedom to choose what works given the data source, developer experience, maintainability, and so on.
Here is another example using the CAR database as a source:
TABLE FILE CAR
-* How many cars per country?
SUM CNT.CAR NOPRINT
BY COUNTRY NOPRINT
-* 'Accumulate' car values.
PRINT COUNTRY AS 'Country'
CAR NOPRINT
COMPUTE NEWCAR/A4096V = IF COUNTRY EQ LAST COUNTRY THEN (NEWCAR || ', ') | CAR ELSE CAR; AS 'Car'
COMPUTE ROW_NUMBER/I5 = IF COUNTRY EQ LAST COUNTRY THEN ROW_NUMBER + 1 ELSE 1; NOPRINT
BY COUNTRY NOPRINT
BY CAR NOPRINT
-* Take only last row of each country.
WHERE TOTAL CNT.CAR EQ ROW_NUMBER
END
Country Car
------- ---
ENGLAND JAGUAR, JENSEN, TRIUMPH
FRANCE PEUGEOT
ITALY ALFA ROMEO, MASERATI
JAPAN DATSUN, TOYOTA
W GERMANY AUDI, BMW