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'm using a table file and I want to count the number of stores that match a certain criteria, the following code works fine if there are at least 1 match, but if the count is 0 it will throw an error saying there is a missing value for &STORE_COUNT when I expect it returns a 0,
TABLE FILE STORE_CATALOG PRINT CNT.STORE_ID AS STORE_COUNT; WHERE STORE_ID EQ '&store_query' ON TABLE SAVE AS STORE_COUNT FORMAT ALPHA END -RUN -READ STORE_COUNT &STORE_COUNT.I5.
TYPE &STORE_COUNT
I really need it to return a 0 to set up a flag later on the program, any help will be appreciated.This message has been edited. Last edited by: Kathleen Butler,
1) Initialize it upfront -SET &STORE_COUNT = 0 ; TABLE FILE STORE_CATALOG PRINT CNT.STORE_ID AS STORE_COUNT; WHERE STORE_ID EQ '&store_query' ON TABLE SAVE AS STORE_COUNT FORMAT ALPHA END -RUN -READ STORE_COUNT &STORE_COUNT.I5.
TYPE &STORE_COUNT or 2) TABLE FILE ... ... END -RUN -SET &STORE_COUNT = &LINES ;
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
On a related note - if you were doing any sort of summation, you might need to use &RECORDS instead of &LINES. For a PRINT they would be the same, but for a SUM, &LINES would be the number of aggregated lines while &RECORDS would be the number of individual records in the answer set.
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