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.
Hello Webfocus Users, I have a problem witch is difficult to explain for me, so I prepared an example with Employee table.
If you execute the following lines, you obtain 2 data lines for field "number of months" equal to 401 and a totalisation line *TOTAL 401.
the value of field amount by month is : 21780 + 9000 = 30 780 / (401 + 401) = 38,38
The number of months is summed and I don't want. I want 30780/401 = 76,76 as result on the total line.
How can I do that ? (if the field number_of_months is in first position in the BY list,it works but in my case, the field can not be in first position). Thanks a lot for answers. Catherine
TABLE FILE EMPLOYEE SUM 'EMPLOYEE.EMPINFO.NEW_HIRE_DATE' 'EMPLOYEE.EMPINFO.CURR_SAL/D12.2!e' COMPUTE amount_by_month/D12.2 = EMPLOYEE.EMPINFO.CURR_SAL / EMPLOYEE.EMPINFO.NUMBER_OF_MONTHS; BY 'EMPLOYEE.EMPINFO.NUMBER_OF_MONTHS' BY 'EMPLOYEE.EMPINFO.DEPARTMENT' BY 'EMPLOYEE.EMPINFO.NUMBER_OF_MONTHS' BY 'EMPLOYEE.EMPINFO.LAST_NAME' BY 'EMPLOYEE.EMPINFO.FIRST_NAME' WHERE DEPARTMENT EQ 'MIS'; ON EMPLOYEE.EMPINFO.NUMBER_OF_MONTHS SUBTOTAL RECOMPUTE AS '*TOTAL' ON TABLE NOTOTAL ENDThis message has been edited. Last edited by: <Kathryn Henning>,
7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....) OS400 V5R3, V5R4 Windows 2000/2003/2007/2010
Posts: 68 | Location: France | Registered: February 27, 2008
-SET &END_DATE = '09072015';
DEFINE FILE EMPLOYEE
NEW_HIRE_DATE/YYMD = DATECVT(HIRE_DATE, 'I6YMD', 'YYMD');
NEW_DAT_INC/YYMD = DATECVT(&END_DATE, 'I8MDYY', 'YYMD');
NUMBER_OF_MONTHS/I8 = DATEDIF(NEW_HIRE_DATE, NEW_DAT_INC, 'M');
END
TABLE FILE EMPLOYEE
SUM
'EMPLOYEE.EMPINFO.NEW_HIRE_DATE'
'EMPLOYEE.EMPINFO.CURR_SAL/D12.2!e'
COMPUTE amount_by_month/D12.2 = EMPLOYEE.EMPINFO.CURR_SAL / EMPLOYEE.EMPINFO.NUMBER_OF_MONTHS;
-*BY 'EMPLOYEE.EMPINFO.NUMBER_OF_MONTHS'
BY 'EMPLOYEE.EMPINFO.DEPARTMENT'
BY 'EMPLOYEE.EMPINFO.NUMBER_OF_MONTHS'
BY 'EMPLOYEE.EMPINFO.LAST_NAME'
BY 'EMPLOYEE.EMPINFO.FIRST_NAME'
WHERE DEPARTMENT EQ 'MIS';
ON EMPLOYEE.EMPINFO.NUMBER_OF_MONTHS SUBTOTAL AS '*TOTAL'
ON TABLE NOTOTAL
END
Is that what you're looking for ?
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
-SET &END_DATE = '09072015';
DEFINE FILE EMPLOYEE
NEW_HIRE_DATE/YYMD = DATECVT(HIRE_DATE, 'I6YMD', 'YYMD');
NEW_DAT_INC/YYMD = DATECVT(&END_DATE, 'I8MDYY', 'YYMD');
NUMBER_OF_MONTHS/I8 = DATEDIF(NEW_HIRE_DATE, NEW_DAT_INC, 'M');
END
TABLE FILE EMPLOYEE
SUM
NEW_HIRE_DATE
CURR_SAL/D12.2!e
COMPUTE cnt/I11 = CNT.NUMBER_OF_MONTHS;
COMPUTE amount_by_month/D12.2 = CURR_SAL / (NUMBER_OF_MONTHS/cnt);
BY NUMBER_OF_MONTHS
BY DEPARTMENT
BY NUMBER_OF_MONTHS
BY LAST_NAME
BY FIRST_NAME
WHERE DEPARTMENT EQ 'MIS';
ON NUMBER_OF_MONTHS SUBTOTAL RECOMPUTE AS '*TOTAL'
ON TABLE NOTOTAL
END