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.
SET PAGE=NOLEAD
TABLE FILE GGSALES
SUM
COMPUTE SALES_LEVEL/A1 = IF DOLLARS LT 160000 THEN '1' ELSE IF DOLLARS GT 190000 THEN '3' ELSE '2';
ACROSS DATE AS ''
BY STCD
WHERE DATE IN (19960701, 19960801)
END
I'll play around and see if I can figure out something, but at first glance, the issue I see is that you would have to sort on a computed column which is OK (BY TOTAL SALES_LEVEL) EXCEPT for the fact that I don't think you can use a BY TOTAL with an ACROSS in the same phrase, which throws out the possibility of a single pass.
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
Right - but in order to get the store count you would have to sum BY the sales level calculations. The BY is needed to get the store breakdown - not necessarily to perform any sorting. I think your only option is to hold your first request and then read the hold file and sort by the sales_level columns.
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
Is the palcement of the columns important? If not try the code below and play with it
SET PAGE=NOLEAD
DEFINE FILE GGSALES
SALES_LEVEL/A1 = IF DOLLARS LT 16000 THEN '1' ELSE IF DOLLARS GT 19000 THEN '3' ELSE '2';
DATEA/A1=IF DATE EQ 19960701 THEN '1' ELSE IF DATE EQ 19960801 THEN '2' ELSE '';
STORECD/A10=SALES_LEVEL|' '|DATEA;
END
TABLE FILE GGSALES
SUM
CNT.STCD
BY STORECD AS ''
WHERE DATE IN (19960701, 19960801)
END
WF 7.6.11 Oracle WebSphere Windows NT-5.2 x86 32bit