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 just new to web focus and asked to generate a report like this.
ColA ColB ColC ColD ColE ColF Rank Item Qty Consumption Value Classification Percent Sum% 1 A 40 40% 40% A 2 B 35 35% 75% A 3 C 15 15% 90% B 4 D 5 5% 95% B 5 E 5 5% 100% C 100%
My question is how to produce ColE and ColF. ColF is the classification of Items. I need to group are those items belonging to the first 70% to class A, next 20% to Class B and the remaining 10% to class C.
It is a little difficult to answer without knowing the data source, and what you are sorting on for the report. You can compute the classification in ColF and the ColE based on the value in your ColD if you are sorting on ColB. Is the ColA value based on the sum of the item? You may need to do a BY TOTAL to get it in the order you want as one option.
Or you can create your sums and hold in a file you then do defines of the columns and generate the report from the hold file.
I know there are threads on the formum as well. Have you tried searching.
We have many out there who have excellent examples.
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
Based on your numbers, I don't get the quite the same answers as you do (see rank 2).
The first part of this code is constructing a test file but you should get the idea from the computes.
APP FI CLASSLIST DISK classlist.mas
-RUN
-WRITE CLASSLIST
-WRITE CLASSLIST FILE=CLASSLIST ,SUFFIX=FIX
-WRITE CLASSLIST SEGNAME=SEG1
-WRITE CLASSLIST FIELD=CL_RANK,,I1,A1,$
-WRITE CLASSLIST FIELD=CL_ITEM,,A1,A1,$
-WRITE CLASSLIST FIELD=CL_QTY,, I4,A2,$
-WRITE CLASSLIST FIELD=CL_CONS,,I4%,A2,$
APP FI CLASSLIST DISK classlist.ftm
-RUN
-WRITE CLASSLIST 1A4040
-WRITE CLASSLIST 2B3535
-WRITE CLASSLIST 3C1515
-WRITE CLASSLIST 4D0505
-WRITE CLASSLIST 5E0505
TABLE FILE CLASSLIST
PRINT CL_ITEM CL_QTY CL_CONS
COMPUTE VALUE/I4%=LAST VALUE + CL_CONS;
CL_CLASS/A1=IF VALUE LE 70 THEN 'A' ELSE IF VALUE LE 90 THEN 'B' ELSE 'C';
BY CL_RANK
END
CL_RANK CL_ITEM CL_QTY CL_CONS VALUE CL_CLASS
1 A 40 40% 40% A
2 B 35 35% 75% B
3 C 15 15% 90% B
4 D 5 5% 95% C
5 E 5 5% 100% C