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.
Here's an example from CAR: DEFINE FILE CAR CONCAT_STR/A200V=IF COUNTRY EQ LAST COUNTRY THEN (CONCAT_STR ||', '|| CAR ) ELSE CAR; END TABLE FILE CAR SUM CONCAT_STR BY COUNTRY END
This assumes that the total length of the concatenated values will never be more than 200, but you can change that based on your need. It also assumes that data is already in order of Sort field (COUNTRY in this case)
You get COUNTRY CONCAT_STR ENGLAND JAGUAR,JENSEN,TRIUMPH FRANCE PEUGEOT ITALY ALFA ROMEO,MASERATI JAPAN DATSUN,TOYOTA W GERMANY AUDI,BMWThis message has been edited. Last edited by: Darin Lee,
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Here is an example from one of my apps, using a counter. This concatentates a list of up to ten policy riders together, separated by a space. DEFINE FILE HLDRIDER COUNTER/I2=IF POL_NB EQ LAST POL_NB THEN COUNTER + 1 ELSE 1; RDRSTRING/A65=IF POL_NB EQ LAST POL_NB THEN RDRSTRING ELSE ''; RDRSTRING/A65= IF COUNTER EQ 1 THEN OVRLAY(RDRSTRING, 65, RDR_FORM_NB, 5, 1, RDRSTRING) ELSE IF COUNTER EQ 2 THEN OVRLAY(RDRSTRING, 65, RDR_FORM_NB, 5, 7, RDRSTRING) ELSE IF COUNTER EQ 3 THEN OVRLAY(RDRSTRING, 65, RDR_FORM_NB, 5, 13, RDRSTRING) ELSE IF COUNTER EQ 4 THEN OVRLAY(RDRSTRING, 65, RDR_FORM_NB, 5, 19, RDRSTRING) ELSE IF COUNTER EQ 5 THEN OVRLAY(RDRSTRING, 65, RDR_FORM_NB, 5, 25, RDRSTRING) ELSE IF COUNTER EQ 6 THEN OVRLAY(RDRSTRING, 65, RDR_FORM_NB, 5, 31, RDRSTRING) ELSE IF COUNTER EQ 7 THEN OVRLAY(RDRSTRING, 65, RDR_FORM_NB, 5, 37, RDRSTRING) ELSE IF COUNTER EQ 8 THEN OVRLAY(RDRSTRING, 65, RDR_FORM_NB, 5, 43, RDRSTRING) ELSE IF COUNTER EQ 9 THEN OVRLAY(RDRSTRING, 65, RDR_FORM_NB, 5, 49, RDRSTRING) ELSE IF COUNTER EQ 10 THEN OVRLAY(RDRSTRING, 65, RDR_FORM_NB, 5, 55, RDRSTRING) ELSE 'MORE'; END TABLE FILE HLDRIDER SUM RDRSTRING BY POL_NB WHERE COUNTER LE 10; ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE HOLD AS HLDRIDER_LTC FORMAT FOCUS INDEX POL_NB
Usernani, Assuming that the field MONTH is I2 and takes values from 1 to 12 and also 99.
DEFINE FILE ...
AMONTH/A4=IF MONTH EQ 99 THEN '1-12' ELSE FTOA(MONTH,'(D4c)','A4');
END
TABLE FILE ...
LIST AMONTH BY KEY
ON TABLE HOLD
END
TABLE FILE HOLD
SUM AMONTH
BY KEY
ACROSS LIST NOPRINT
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006