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.
Probably the quickest (but not necessarily most efficient) is to use BY HIGHEST 1. For Example TABLE FILE CAR PRINT CAR BY HIGHEST 1 COUNTRY END
You get all the car records that contains the MAX value of country: W GERMANY AUDI BMW
What it's actually doing is retrieveing all records, then throwing them all out except for those that contain the highest sort value of COUNTRY. IF you don't have other selection criteria and your record count is extrememly large, this may not be the best solution.
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
The following example would also work and is a little more efficient:
TABLE FILE CAR SUM COMPUTE MAXCTY/A10=MAX.COUNTRY; NOPRINT SUM CAR BY COUNTRY BY CAR NOPRINT WHERE TOTAL COUNTRY EQ MAXCTY END
Most efficient would probably be one request to determine the MAX.RUN_D, hold then either join to that holdfile or use WHERE RUN_D EQ (HOLDFIL)
You can see there are several options. Any other ideas out there?
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
the field RUN_D is an alpha field with format MM/DD/YYYY, so if you try to find the max value of this field as it is you will get the wrong answer (or at least an answer you can not trust)
the maxvalue is the first of jan 2008, but if you sort them in alpha format you will get the december 14 2007 as answer. so firts you have to convert this alpha field to real date field and then find the highest value
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
Sorry - missed that. Frank is correct - convert it to a real date format (like A8yymd) first using edits. Then the rest would work.
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